summaryrefslogtreecommitdiff
path: root/ishtar_common/templates/ishtar/blocks/sheet_simple_map.html
blob: d0ec50b5f708f395b1eb37c6affdf261cbff8c09 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
{% if geo_item.point_2d or geo_item.multi_polygon %}
<div class="col-12 col-lg-6 flex-wrap">
<div class="window-map" id="map-{{window_id}}-{{geo_item.SLUG}}-{{geo_item.pk}}">
</div>
<div id="map-content-{{window_id}}-{{geo_item.SLUG}}-{{geo_item.pk}}"></div>
</div>
<script type="text/javascript">
var html = render_map("map-{{window_id}}-{{geo_item.SLUG}}-{{geo_item.pk}}");
$("#map-content-{{window_id}}-{{geo_item.SLUG}}-{{geo_item.pk}}").html(html);
{% 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 %}