summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorluxagraf <sng@luxagraf.net>2021-08-15 20:36:41 -0400
committerluxagraf <sng@luxagraf.net>2021-08-15 20:36:41 -0400
commit791da875bb519bf8e21d075c89bc603aed6936f3 (patch)
tree4991b82b6cb8e4036c3e8d1bb458c2f1ef7ee3bb
parent8e1fe8fc170bd004e76ac189922d8f811880f6ff (diff)
plan: fixed a map tile bug
-rw-r--r--app/planner/templates/planner/list.html26
1 files changed, 13 insertions, 13 deletions
diff --git a/app/planner/templates/planner/list.html b/app/planner/templates/planner/list.html
index 12b72a3..b426c57 100644
--- a/app/planner/templates/planner/list.html
+++ b/app/planner/templates/planner/list.html
@@ -16,23 +16,23 @@
{% if object.has_electric %}<li class="water">electric</li>{% endif %}
</article>{% endfor %}
</div>
-<div id="map">
-</div>
+ <div id="mapid" ></div>
{% endblock %}
{% block js %}
- <link rel="stylesheet" src="/media/js/leaflet-1.7.1/leaflet.css" integrity="sha512-xodZBNTC5n17Xt2atTPuE1HxjVMSvLVW9ocqUKLsCC5CXdbqCmblAshOMAS6/keqq/sMZMZ19scR4PsZChSR7A==" />
+
+ <link rel="stylesheet" href="/media/js/leaflet-1.7.1/leaflet.css" integrity="sha512-xodZBNTC5n17Xt2atTPuE1HxjVMSvLVW9ocqUKLsCC5CXdbqCmblAshOMAS6/keqq/sMZMZ19scR4PsZChSR7A==" />
<script src="/media/js/leaflet-1.7.1/leaflet.js" integrity="sha512-XQoYMqMTK8LvdxXYG3nZ448hOEQiglfqkJs1NOQV44cWnUrBc8PkAOcXy20w0vlaXaVUearIOBhiXZ5V3ynxwA=="></script>
<script>
-// initialize the map on the "map" div with a given center and zoom
-var map = new L.Map('map', {
- center: new L.LatLng(51.46, -0.205),
- zoom: 15
-});
-// create a new tile layer
-var tileUrl = 'https://tile.thunderforest.com/cycle/{z}/{x}/{y}.png?apikey=c9a9f0c5edfd4ce2948f49b51f533ad2',
-layer = new L.TileLayer(tileUrl, {maxZoom: 18});
-// add the layer to the map
-map.addLayer(layer);
+
+ var mymap = L.map('mapid').setView([51.505, -0.09], 13);
+
+ L.tileLayer('https://tile.thunderforest.com/outdoors/{z}/{x}/{y}.png?apikey=c9a9f0c5edfd4ce2948f49b51f533ad2', {
+ maxZoom: 18,
+ attribution: 'Map data &copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors, ' +
+ 'Imagery © <a href="https://www.mapbox.com/">Mapbox</a>',
+ }).addTo(mymap);
+
+
</script>
{% endblock %}