render 9zoom tiles

This commit is contained in:
NatureFreshMilk 2019-01-17 16:35:28 +01:00
parent 05ec5ded3e
commit 7cff189b0b
2 changed files with 5 additions and 5 deletions

View File

@ -19,7 +19,7 @@ func Render(tr *tilerenderer.TileRenderer,
layers []layerconfig.Layer){
start := time.Now()
complete_count := 512*512
complete_count := 256*256
current_count := 0
perf_count := 0
@ -33,9 +33,9 @@ func Render(tr *tilerenderer.TileRenderer,
for _, layer := range(layers) {
//zoom 10 iterator
for x := -255; x<256; x++ {
for y := -255; y<256; y++ {
tc := coords.NewTileCoords(x,y,10,layer.Id)
for x := -127; x<128; x++ {
for y := -127; y<128; y++ {
tc := coords.NewTileCoords(x,y,9,layer.Id)
jobs <- tc
current_count++
perf_count++

View File

@ -166,7 +166,7 @@ func (tr *TileRenderer) RenderImage(tc coords.TileCoords) (*image.NRGBA, error)
isEmpty := upperLeft == nil && upperRight == nil && lowerLeft == nil && lowerRight == nil
if isEmpty && tc.Zoom == 11 {
if isEmpty && (tc.Zoom == 11 || tc.Zoom == 10) {
//don't cache empty zoomed tiles
return nil, nil
}