forked from MTSR/mapserver
render 9zoom tiles
This commit is contained in:
parent
05ec5ded3e
commit
7cff189b0b
@ -19,7 +19,7 @@ func Render(tr *tilerenderer.TileRenderer,
|
|||||||
layers []layerconfig.Layer){
|
layers []layerconfig.Layer){
|
||||||
|
|
||||||
start := time.Now()
|
start := time.Now()
|
||||||
complete_count := 512*512
|
complete_count := 256*256
|
||||||
current_count := 0
|
current_count := 0
|
||||||
perf_count := 0
|
perf_count := 0
|
||||||
|
|
||||||
@ -33,9 +33,9 @@ func Render(tr *tilerenderer.TileRenderer,
|
|||||||
for _, layer := range(layers) {
|
for _, layer := range(layers) {
|
||||||
|
|
||||||
//zoom 10 iterator
|
//zoom 10 iterator
|
||||||
for x := -255; x<256; x++ {
|
for x := -127; x<128; x++ {
|
||||||
for y := -255; y<256; y++ {
|
for y := -127; y<128; y++ {
|
||||||
tc := coords.NewTileCoords(x,y,10,layer.Id)
|
tc := coords.NewTileCoords(x,y,9,layer.Id)
|
||||||
jobs <- tc
|
jobs <- tc
|
||||||
current_count++
|
current_count++
|
||||||
perf_count++
|
perf_count++
|
||||||
|
@ -166,7 +166,7 @@ func (tr *TileRenderer) RenderImage(tc coords.TileCoords) (*image.NRGBA, error)
|
|||||||
|
|
||||||
isEmpty := upperLeft == nil && upperRight == nil && lowerLeft == nil && lowerRight == nil
|
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
|
//don't cache empty zoomed tiles
|
||||||
return nil, nil
|
return nil, nil
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user