Add Map in Posts

This commit is contained in:
2022-10-07 18:31:03 +02:00
parent 6dfa8dad9b
commit c9ee674b2d
14 changed files with 1859 additions and 3 deletions

View File

@@ -0,0 +1,12 @@
{{ $markerLat := default "" .markerLat }}
{{ $markerLon := default "" .markerLon }}
{{ $mapId := default (md5 (printf "%s%s" $markerLat $markerLon)) .mapId }}
{{ $markerId := md5 (printf "%s%s%s" $mapId $markerLat $markerLon)}}
<script>
//Marker
leafletMarkersObj[{{ $markerId }}] = L.marker([{{ $markerLat }}, {{ $markerLon }}]).addTo(leafletMapsObj[{{ $mapId }}]);
</script>