block accessor in app ctx

This commit is contained in:
NatureFreshMilk 2019-07-31 13:43:57 +02:00
parent 2b02558ba0
commit 6ed86683ad

View File

@ -1,6 +1,7 @@
package app
import (
"mapserver/blockaccessor"
"mapserver/colormapping"
"mapserver/db/postgres"
"mapserver/db/sqlite"
@ -71,11 +72,15 @@ func Setup(p params.ParamsType, cfg *Config) *App {
panic(err)
}
// mapblock accessor
a.MapBlockAccessor = mapblockaccessor.NewMapBlockAccessor(
a.Blockdb,
expireDuration, purgeDuration,
cfg.MapBlockAccessorCfg.MaxItems)
// block accessor
a.BlockAccessor = blockaccessor.New(a.MapBlockAccessor)
//color mapping
a.Colormapping = colormapping.NewColorMapping()