diff --git a/mapblockaccessor/mapblockaccessor.go b/mapblockaccessor/mapblockaccessor.go index edac4e6..686a088 100644 --- a/mapblockaccessor/mapblockaccessor.go +++ b/mapblockaccessor/mapblockaccessor.go @@ -19,7 +19,7 @@ type MapBlockAccessor struct { } type MapBlockListener interface { - OnParsedMapBlock(block *mapblockparser.MapBlock, pos coords.MapBlockCoords) + OnParsedMapBlock(block *mapblockparser.MapBlock) } func getKey(pos coords.MapBlockCoords) string { @@ -82,7 +82,7 @@ func (a *MapBlockAccessor) FindLegacyMapBlocks(lastpos coords.MapBlockCoords, li } for _, listener := range a.listeners { - listener.OnParsedMapBlock(mapblock, block.Pos) + listener.OnParsedMapBlock(mapblock) } a.c.Set(key, mapblock, cache.DefaultExpiration) @@ -130,7 +130,7 @@ func (a *MapBlockAccessor) FindLatestMapBlocks(mintime int64, limit int, layerfi } for _, listener := range a.listeners { - listener.OnParsedMapBlock(mapblock, block.Pos) + listener.OnParsedMapBlock(mapblock) } a.c.Set(key, mapblock, cache.DefaultExpiration) @@ -163,7 +163,7 @@ func (a *MapBlockAccessor) GetMapBlock(pos coords.MapBlockCoords) (*mapblockpars } for _, listener := range a.listeners { - listener.OnParsedMapBlock(mapblock, pos) + listener.OnParsedMapBlock(mapblock) } a.c.Set(key, mapblock, cache.DefaultExpiration) diff --git a/mapobject/clearmapdata.go b/mapobject/clearmapdata.go index 1f68c8e..34d0879 100644 --- a/mapobject/clearmapdata.go +++ b/mapobject/clearmapdata.go @@ -1,7 +1,6 @@ package mapobject import ( - "mapserver/coords" "mapserver/mapblockparser" "mapserver/mapobjectdb" ) @@ -10,8 +9,8 @@ type ClearMapData struct { db mapobjectdb.DBAccessor } -func (this *ClearMapData) OnParsedMapBlock(block *mapblockparser.MapBlock, pos coords.MapBlockCoords) { - err := this.db.RemoveMapData(pos) +func (this *ClearMapData) OnParsedMapBlock(block *mapblockparser.MapBlock) { + err := this.db.RemoveMapData(block.Pos) if err != nil { panic(err) } diff --git a/mapobject/poi.go b/mapobject/poi.go index c013865..172d229 100644 --- a/mapobject/poi.go +++ b/mapobject/poi.go @@ -1,7 +1,6 @@ package mapobject import ( - "mapserver/coords" "mapserver/mapblockparser" "mapserver/mapobjectdb" ) @@ -10,7 +9,7 @@ type POI struct { db mapobjectdb.DBAccessor } -func (this *POI) OnParsedMapBlock(block *mapblockparser.MapBlock, pos coords.MapBlockCoords) { +func (this *POI) OnParsedMapBlock(block *mapblockparser.MapBlock) { var found bool for _, v := range block.BlockMapping { if v == "mapserver:poi" {