Skip to content

Commit 98d9ca9

Browse files
author
Sean Sullivan
committed
Set a maximum zoom level of 29
1 parent 692b878 commit 98d9ca9

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

elastic_datashader/tilegen.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1019,7 +1019,8 @@ def generate_tile(idx, x, y, z, headers, params, tile_width_px=256, tile_height_
10191019
raise ValueError("invalid resolution value")
10201020

10211021
# don't allow geotile precision to be any worse than current zoom
1022-
geotile_precision = max(current_zoom, current_zoom + agg_zooms)
1022+
MAXIMUM_PERCISION
1023+
geotile_precision = min(max(current_zoom, current_zoom + agg_zooms),MAXIMUM_PERCISION)
10231024

10241025
tile_s = copy.copy(base_s)
10251026
tile_s = tile_s.params(size=0, track_total_hits=False)
@@ -1153,7 +1154,7 @@ def generate_tile(idx, x, y, z, headers, params, tile_width_px=256, tile_height_
11531154
elif resolution == "finest":
11541155
zoom = 7
11551156
spread = 1
1156-
geotile_precision = current_zoom+zoom
1157+
geotile_precision = min(current_zoom+zoom,geotile_precision)
11571158
searches = []
11581159

11591160
if params.get("generated_params", {}).get('complete', False):

0 commit comments

Comments
 (0)