Map: positions
This commit is contained in:
parent
d3da1077b2
commit
98f519215a
4 changed files with 43 additions and 1 deletions
15
templates/shortcodes/map.html
Normal file
15
templates/shortcodes/map.html
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
<div id="map" class="nn"></div>
|
||||
<script type="text/javascript" src="/vendor/leaflet/leaflet.js"></script>
|
||||
<script type="text/javascript">
|
||||
var map = L.map('map').setView([46.725, 2.834], 6);
|
||||
L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', {
|
||||
maxZoom: 10,
|
||||
attribution: '© <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'
|
||||
}).addTo(map);
|
||||
var places = [
|
||||
{{body|safe}}
|
||||
];
|
||||
for(i in places) {
|
||||
L.marker(places[i]).addTo(map);
|
||||
}
|
||||
</script>
|
||||
Loading…
Add table
Add a link
Reference in a new issue