summaryrefslogtreecommitdiff
path: root/ishtar_common/templates/ishtar/blocks/sheet_simple_map.html
diff options
context:
space:
mode:
authorÉtienne Loks <etienne@peacefrogs.net>2019-02-06 19:08:42 +0100
committerÉtienne Loks <etienne.loks@iggdrasil.net>2019-04-24 19:38:56 +0200
commit7940a5e8379f822da0514e3f9068f9b3221331e3 (patch)
tree40856bb52074133833bb506a57118d11b96a0dfa /ishtar_common/templates/ishtar/blocks/sheet_simple_map.html
parent251a3124d2c462620a5f6ecfff9160f853a113b0 (diff)
downloadIshtar-7940a5e8379f822da0514e3f9068f9b3221331e3.tar.bz2
Ishtar-7940a5e8379f822da0514e3f9068f9b3221331e3.zip
Sheet - Map: WIP - manage vector source for polygons
Diffstat (limited to 'ishtar_common/templates/ishtar/blocks/sheet_simple_map.html')
-rw-r--r--ishtar_common/templates/ishtar/blocks/sheet_simple_map.html15
1 files changed, 15 insertions, 0 deletions
diff --git a/ishtar_common/templates/ishtar/blocks/sheet_simple_map.html b/ishtar_common/templates/ishtar/blocks/sheet_simple_map.html
new file mode 100644
index 000000000..bf25db653
--- /dev/null
+++ b/ishtar_common/templates/ishtar/blocks/sheet_simple_map.html
@@ -0,0 +1,15 @@
+{% if geo_item.point_2d or geo_item.multi_polygon %}
+<div class="window-map"
+ id="map-{{window_id}}-{{geo_item.SLUG}}-{{geo_item.pk}}"></div>
+
+<script type="text/javascript">
+{% if geo_item.point_source == 'P' or not geo_item.multi_polygon %}
+var {{geo_item.SLUG}}{{geo_item.pk}} = {{geo_item.point_2d_geojson|safe}};
+display_map("map-{{window_id}}-{{geo_item.SLUG}}-{{geo_item.pk}}", {{geo_item.SLUG}}{{geo_item.pk}});
+{% else %}
+var {{geo_item.SLUG}}{{geo_item.pk}} = {{geo_item.multi_polygon_geojson|safe}};
+display_map("map-{{window_id}}-{{geo_item.SLUG}}-{{geo_item.pk}}", null, {{geo_item.SLUG}}{{geo_item.pk}});
+{% endif %}
+</script>
+
+{% endif %}