# leaflet-map/3.0.5/scripts/shortcode-helper.min.js

Leaflet Map, version 3.0.5. 2 lines.

- Page: https://pluginprobe.com/plugins/leaflet-map/3.0.5/code/scripts/shortcode-helper.min.js
- Raw: https://pluginprobe.com/plugins/leaflet-map/3.0.5/raw/scripts/shortcode-helper.min.js
- Modified: 2019-09-12T14:24:14+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/leaflet-map/3.0.5/code/scripts/shortcode-helper.min.js#L10-L20`.

```javascript
window.WPLeafletMapPlugin=window.WPLeafletMapPlugin||[],window.WPLeafletMapPlugin.push((function(){var e=document.getElementById("map-shortcode"),t=document.getElementById("marker-shortcode"),n=window.WPLeafletMapPlugin.maps[0],a=window.WPLeafletMapPlugin.markers[0];function l(){var e=a.getLatLng();t.value="[leaflet-marker lat="+e.lat+" lng="+e.lng+"]"}function o(){var t=n.getBounds(),l=t.getCenter();e.value="[leaflet-map lat="+l.lat+" lng="+l.lng+" zoom="+n.getZoom()+"]",t.contains(a.getLatLng())||a.setLatLng(l)}a.on("drag",l),n.on("move",o),o(),l(),e.addEventListener?(e.addEventListener("click",(function(){this.select()})),t.addEventListener("click",(function(){this.select()}))):(e.attachEvent("onclick",(function(){e.select()})),t.attachEvent("onclick",(function(){t.select()})))}));

```
