1
0
forked from MTSR/mapserver

fix tile render hickups

This commit is contained in:
Thomas Rudin 2019-01-27 18:34:04 +01:00
parent 98780830f4
commit bf764b1a34
2 changed files with 4 additions and 31 deletions

View File

@ -17,37 +17,6 @@ func renderMapblocks(ctx *app.App, jobs chan *coords.TileCoords, mblist []*mapbl
tileRenderedMap := make(map[string]bool)
tilecount := 0
for i := 12; i >= 1; i-- {
for _, mb := range mblist {
//13
tc := coords.GetTileCoordsFromMapBlock(mb.Pos, ctx.Config.Layers)
//12-1
tc = tc.ZoomOut(13 - i)
key := getTileKey(tc)
if tileRenderedMap[key] {
continue
}
tileRenderedMap[key] = true
fields := logrus.Fields{
"X": tc.X,
"Y": tc.Y,
"Zoom": tc.Zoom,
"LayerId": tc.LayerId,
}
logrus.WithFields(fields).Debug("Tile removing (z12-1)")
//remove tile
ctx.Objectdb.RemoveTile(tc)
}
}
tileRenderedMap = make(map[string]bool)
for i := 12; i >= 1; i-- {
for _, mb := range mblist {
//13

View File

@ -7,6 +7,10 @@ import (
func worker(ctx *app.App, coords <-chan *coords.TileCoords) {
for tc := range coords {
//remove tile
ctx.Objectdb.RemoveTile(tc)
//render tile
_, err := ctx.Tilerenderer.Render(tc, 5)
if err != nil {
panic(err)