haldis/app/templates/maps.html
2019-04-06 19:05:52 +02:00

39 lines
833 B
HTML

{% extends "layout.html" %}
{% set active_page = "map" -%}
{% import "utils.html" as util %}
{% block container %}
<div id="mapid"></div>
{% endblock %}
{% block styles %}
{{ super() }}
<link rel="stylesheet" href="{{ url_for('static', filename='css/leaflet.css') }}">
<link rel="stylesheet" href="{{url_for('static', filename='css/map.css')}}">
{% endblock %}
{% block scripts %}
{{super()}}
<script src="{{ url_for('static', filename='js/leaflet.js')}}"></script>
<script src="{{ url_for('static', filename='js/map.js' ) }}"></script>
<script>
let locations = [];
let loc = {};
{% for loc in locations -%}
{% if loc.address %}
loc = {
"address": "{{loc.address}}",
"name": "{{loc.name}}"
};
locations.push(loc);
{% endif %}
{%- endfor %}
loadmap(locations);
</script>
{% endblock %}