Add Map in Posts
This commit is contained in:
12
layouts/partials/leaflet-marker.html
Normal file
12
layouts/partials/leaflet-marker.html
Normal 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>
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user