forked from MTSR/mapserver
fix initial rendering glitch
This commit is contained in:
parent
986b9dbdb9
commit
44b4eef640
@ -177,6 +177,15 @@ func (a *MapBlockAccessor) FindMapBlocksByPos(lastpos *coords.MapBlockCoords, li
|
||||
result.LastPos = newlastpos
|
||||
result.List = mblist
|
||||
|
||||
fields = logrus.Fields{
|
||||
"len(List)": len(result.List),
|
||||
"unfilteredCount": result.UnfilteredCount,
|
||||
"hasMore": result.HasMore,
|
||||
"limit": limit,
|
||||
}
|
||||
logrus.WithFields(fields).Debug("FindMapBlocksByPos:Result")
|
||||
|
||||
|
||||
return &result, nil
|
||||
}
|
||||
|
||||
|
@ -46,6 +46,12 @@ func TestStrings(t *testing.T){
|
||||
t.Fatal("getint failed")
|
||||
}
|
||||
|
||||
s.SetInt("i3", -123)
|
||||
i = s.GetInt("i3", 456)
|
||||
if i != -123 {
|
||||
t.Fatal("getint negative failed")
|
||||
}
|
||||
|
||||
if s.GetInt("i2", 111) != 111 {
|
||||
t.Fatal("getint with default failed")
|
||||
}
|
||||
|
@ -10,7 +10,8 @@ import (
|
||||
)
|
||||
|
||||
func getTileKey(tc *coords.TileCoords) string {
|
||||
return strconv.Itoa(tc.X) + "/" + strconv.Itoa(tc.Y) + "/" + strconv.Itoa(tc.Zoom)
|
||||
return strconv.Itoa(tc.X) + "/" + strconv.Itoa(tc.Y) + "/" +
|
||||
strconv.Itoa(tc.Zoom) + "/" + strconv.Itoa(tc.LayerId)
|
||||
}
|
||||
|
||||
func renderMapblocks(ctx *app.App, jobs chan *coords.TileCoords, mblist []*mapblockparser.MapBlock) int {
|
||||
|
@ -26,9 +26,9 @@ func initialRender(ctx *app.App, jobs chan *coords.TileCoords) {
|
||||
}
|
||||
logrus.WithFields(fields).Info("Starting initial rendering job")
|
||||
|
||||
lastx := ctx.Settings.GetInt(settings.SETTING_LASTX, -1)
|
||||
lasty := ctx.Settings.GetInt(settings.SETTING_LASTY, -1)
|
||||
lastz := ctx.Settings.GetInt(settings.SETTING_LASTZ, -1)
|
||||
lastx := ctx.Settings.GetInt(settings.SETTING_LASTX, coords.MinCoord-1)
|
||||
lasty := ctx.Settings.GetInt(settings.SETTING_LASTY, coords.MinCoord-1)
|
||||
lastz := ctx.Settings.GetInt(settings.SETTING_LASTZ, coords.MinCoord-1)
|
||||
|
||||
lastcoords := coords.NewMapBlockCoords(lastx, lasty, lastz)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user