summaryrefslogtreecommitdiff
path: root/ishtar_common/templates/gis/openlayers-osm.html
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2022-06-08 12:10:44 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2022-12-12 12:21:01 +0100
commitf4bbccb5214ff0dd2cbd7bc76973f64c06fc9509 (patch)
treefe6e7dbda13a8aef85247aba058b3231af890f96 /ishtar_common/templates/gis/openlayers-osm.html
parentfcdab311103db69b15589e07354a8e91aec64c67 (diff)
downloadIshtar-f4bbccb5214ff0dd2cbd7bc76973f64c06fc9509.tar.bz2
Ishtar-f4bbccb5214ff0dd2cbd7bc76973f64c06fc9509.zip
Geodata - geoforms: manage large number of related items - fix zoom - better + button
Diffstat (limited to 'ishtar_common/templates/gis/openlayers-osm.html')
-rw-r--r--ishtar_common/templates/gis/openlayers-osm.html2
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 %}