Skip to content

Commit

Permalink
Check bbox prior to zooming
Browse files Browse the repository at this point in the history
  • Loading branch information
bkg committed Feb 21, 2017
1 parent 604773c commit f5e62da
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion spillway/carto.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ def build_map(querysets, tileform):
data = tileform.cleaned_data if tileform.is_valid() else {}
stylename = data.get('style')
m = Map()
m.zoom_bbox(data.get('bbox'))
bbox = data.get('bbox')
if bbox:
m.zoom_bbox(bbox)
for queryset in querysets:
layer = m.layer(queryset, stylename)
if isinstance(layer, RasterLayer):
Expand Down

0 comments on commit f5e62da

Please sign in to comment.