haldis/app/templates/maps.html

43 lines
969 B
HTML
Raw Normal View History

2019-02-14 15:43:07 +00:00
{% extends "layout.html" %}
{% set active_page = "map" -%}
2019-02-14 15:43:07 +00:00
{% import "utils.html" as util %}
{% block container %}
<div id="mapid" class="large-map"></div>
{% endblock %}
2019-02-14 15:43:07 +00:00
{% 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')}}">
2019-02-14 15:43:07 +00:00
{% 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 = {};
2019-04-06 17:05:41 +00:00
{% for loc in locations -%}
{% if loc.address %}
loc = {
"address": "{{loc.address}}",
2019-05-29 13:48:38 +00:00
"name": "{{loc.name}}",
2019-09-10 00:50:22 +00:00
"url": "{{ url_for('general_bp.location', location_id=loc.id) }}"
};
2019-04-06 17:05:41 +00:00
locations.push(loc);
{% endif %}
{%- endfor %}
2019-02-14 18:17:02 +00:00
map.setView([51.0231119, 3.7102741], 14);
loadmap(locations);
</script>
{% endblock %}