layout title pathName default Critical Maps- Gallery galleryPath <script type="text/javascript"> $().ready(function () { var cameraIcon = L.icon({ iconUrl: '/assets/images/marker-photo.png', iconSize: [48, 48], iconAnchor: [24, 24] }); var cameraMap = new L.map('gallerymap', { zoomControl: false }).setView([52.468209, 13.425995], 3); L.mapboxGL({ attribution: '© MapTiler © OpenStreetMap contributors', style: 'https://api.maptiler.com/maps/basic/style.json?key=BF1ZtxvN8zHG9Wc6omQn' }).addTo(cameraMap); new L.Control.Zoom({ position: 'bottomleft' }).addTo(cameraMap); var hash = new L.Hash(cameraMap); function saveHashToElements() { if (hash.lastHash) { $(".hash-append").each(function (index) { $(this).attr("href", $(this).data("template").replace('${hash}', hash.lastHash)); }); } } cameraMap.on("moveend", function () { saveHashToElements() }, this); cameraMap.on("zoomend", function () { saveHashToElements() }, this); $.get("https://api.criticalmaps.net/gallery/", function (response) { for (var i = 0; i < response.length; i++) { var currentImageObject = response[i] L.marker([ criticalMapsUtils.convertCoordinateFormat(currentImageObject.latitude), criticalMapsUtils.convertCoordinateFormat(currentImageObject.longitude)], { icon: cameraIcon } ) .addTo(cameraMap) .bindPopup( '' + '' + ''); } } ); }); </script>