33 lines
1.2 KiB
HTML
33 lines
1.2 KiB
HTML
{% load l10n %}
|
|
{% block cell-content %}
|
|
{% if title %}<h2>{{ title }}</h2>{% endif %}
|
|
{% localize off %}
|
|
<div class="combo-cell-map" data-init-state="{{ initial_state }}"
|
|
data-init-zoom="{{ initial_zoom }}" data-min-zoom="{{ min_zoom }}"
|
|
data-max-zoom="{{ max_zoom }}" data-init-lat="{{ init_lat }}"
|
|
data-init-lng="{{ init_lng }}" data-geojson-url="{{ geojson_url }}"
|
|
data-include-geoloc-button="true"
|
|
{% if group_markers %}data-group-markers="1"{% endif %}
|
|
data-marker-behaviour-onclick="{{ cell.marker_behaviour_onclick }}"
|
|
{% if max_bounds.corner1.lat %}
|
|
data-max-bounds-lat1="{{ max_bounds.corner1.lat }}"
|
|
data-max-bounds-lng1="{{ max_bounds.corner1.lng }}"
|
|
data-max-bounds-lat2="{{ max_bounds.corner2.lat }}"
|
|
data-max-bounds-lng2="{{ max_bounds.corner2.lng }}"
|
|
{% endif %}
|
|
data-cell-id="{{ cell.pk }}"
|
|
>
|
|
{% endlocalize %}
|
|
<script>
|
|
var tiles_{{ cell.pk }} = [];
|
|
{% for layer in tiles_layers %}
|
|
tiles_{{ cell.pk }}.push({
|
|
tile_urltemplate: {{ layer.tile_urltemplate|as_json|safe }},
|
|
map_attribution: {{ layer.map_attribution|as_json|safe }},
|
|
opacity: {{ layer.opacity|as_json|safe }}
|
|
});
|
|
{% endfor %}
|
|
</script>
|
|
</div>
|
|
{% endblock %}
|