diff options
-rw-r--r-- | app/planner/templates/planner/list.html | 26 |
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 © <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors, ' + + 'Imagery © <a href="https://www.mapbox.com/">Mapbox</a>', + }).addTo(mymap); + + </script> {% endblock %} |