diff options
Diffstat (limited to 'ishtar_common/templates/gis/openlayers-osm.html')
-rw-r--r-- | ishtar_common/templates/gis/openlayers-osm.html | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ishtar_common/templates/gis/openlayers-osm.html b/ishtar_common/templates/gis/openlayers-osm.html index 404ab5708..a6797a580 100644 --- a/ishtar_common/templates/gis/openlayers-osm.html +++ b/ishtar_common/templates/gis/openlayers-osm.html @@ -19,5 +19,7 @@ $(document).ready(function() { let layer_extent = features[0].getGeometry().getExtent().slice(0); features.forEach(function(feature){ ol.extent.extend(layer_extent, feature.getGeometry().getExtent())}); {{ module }}.map.getView().fit(layer_extent, {{ module }}.map.getSize()); + let current_zoom = {{ module }}.map.getView().getZoom(); + if ({{ module }}.map.getView().getZoom() > 18) {{ module }}.map.getView().setZoom(18); }); {% endblock %} |