fixed build of shortcode
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 43s
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 43s
This commit is contained in:
@@ -1,13 +1,12 @@
|
|||||||
<!--
|
<!--
|
||||||
Usage:
|
Usage:
|
||||||
{{< osm lat="48.858844" lon="2.294351" zoom="15" height="400px" >}}
|
|
||||||
All parameters are optional except lat/lon.
|
All parameters are optional except lat/lon.
|
||||||
-->
|
-->
|
||||||
<div id="osm-map-{{ .Get "lat" }}-{{ .Get "lon" }}-{{ .Get "zoom" | default "15" }}" style="height:{{ .Get "height" | default "400px" }};"></div>
|
<div id="osm-map-{{ .Get "lat" }}-{{ .Get "lon" }}-{{ .Get "zoom" | default "15" }}" style="height:{{ .Get "height" | default "400px" }};"></div>
|
||||||
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.9.4/dist/leaflet.css" />
|
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.9.4/dist/leaflet.css" />
|
||||||
<script src="https://unpkg.com/leaflet@1.9.4/dist/leaflet.js"></script>
|
<script src="https://unpkg.com/leaflet@1.9.4/dist/leaflet.js"></script>
|
||||||
<script>
|
<script>
|
||||||
(function() {
|
(function () {
|
||||||
var mapId = "osm-map-{{ .Get "lat" }}-{{ .Get "lon" }}-{{ .Get "zoom" | default "15" }}";
|
var mapId = "osm-map-{{ .Get "lat" }}-{{ .Get "lon" }}-{{ .Get "zoom" | default "15" }}";
|
||||||
if (!window._osm_maps) window._osm_maps = {};
|
if (!window._osm_maps) window._osm_maps = {};
|
||||||
if (!window._osm_maps[mapId]) {
|
if (!window._osm_maps[mapId]) {
|
||||||
|
|||||||
Reference in New Issue
Block a user