57 lines
1.7 KiB
HTML
57 lines
1.7 KiB
HTML
{% extends "bootstrap.html" %}
|
|
{% block title %}{{super()}} :: Map{% endblock %}
|
|
{% block head %}{{super()}}
|
|
<link rel="stylesheet" href="{{ url_for('static', filename='leaflet/leaflet.css') }}" />
|
|
<script src="{{ url_for('static', filename='leaflet/leaflet.js') }}"></script>
|
|
<style type="text/css">
|
|
html, body {
|
|
height: 100%;
|
|
}
|
|
.navbar {
|
|
margin-bottom: 0;
|
|
}
|
|
.main_content {
|
|
height: calc(100% - 51px);
|
|
width: 100%;
|
|
padding: 0;
|
|
}
|
|
#map {
|
|
height: 100%;
|
|
width: 100%;
|
|
}
|
|
</style>
|
|
{% endblock %}
|
|
|
|
{% block content %}
|
|
<div id="map"></div>
|
|
<script type="text/javascript">
|
|
var url_get_nearest_router = "{{ url_for('api.get_nearest_router') }}";
|
|
var url_router_info = "{{ url_for('router_info', dbid='') }}";
|
|
var tileurls = {{ tileurls|tojson|safe }};
|
|
var mapurl = "{{ url_for('router_map') }}";
|
|
</script>
|
|
<script src="{{ url_for('static', filename='js/map.js') }}"></script>
|
|
<script type="text/javascript">
|
|
if (window.location.search.match("^\\?mapcenter")) {
|
|
var getargs = window.location.search.replace("?mapcenter=", "").split("&");
|
|
var maploc = getargs[0].split(",");
|
|
map.setView([maploc[0], maploc[1]], maploc[2]);
|
|
if (getargs.length > 1 && getargs[1].match("layers=")) {
|
|
var getlayers = getargs[1].replace("layers=", "").split(",");
|
|
if(getlayers[0]==1) { routers.addTo(map); }
|
|
if(getlayers[1]==1) { routers_v2.addTo(map); }
|
|
if(getlayers[2]==1) { routers_local.addTo(map); }
|
|
if(getlayers[3]==1) { hoods.addTo(map); }
|
|
if(getlayers[4]==1) { hoods_v2.addTo(map); }
|
|
if(getlayers[5]==1) { popuplayer.addTo(map); }
|
|
} else {
|
|
initialLayers();
|
|
}
|
|
}
|
|
else {
|
|
map.setView([49.824, 10.786], 9);
|
|
initialLayers();
|
|
}
|
|
</script>
|
|
{% endblock %}
|