#elementinvader_addons_for_elementor_156227132 .wl_marker-container {
height: 49px !important;
width: 49px !important;
}
jQuery(document).ready(function($) {
var eli_geocoder;
var eli_map;
var eli_markers = [];
var eli_clustererOptions;
var eli_infowindow;
var eli_clusters ='';
var eli_jpopup_customOptions =
{
'maxWidth': 'initial',
'width': 'initial',
'className' : 'popupCustom'
}
if(eli_clusters=='')
eli_clusters = L.markerClusterGroup({spiderfyOnMaxZoom: true, showCoverageOnHover: false, zoomToBoundsOnClick: true});
eli_map = L.map('elementinvader_addons_for_elementor_156227132', {
center: [40.73061,-73.935242],
zoom: 10,
scrollWheelZoom: false,
dragging: !L.Browser.mobile,tap: !L.Browser.mobile
});
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
attribution: '©
OpenStreetMap contributors'
}).addTo(eli_map);
var innerMarker = '
';innerMarker = '
';
var marker = L.marker(
[40.73061, -73.935242],
{icon: L.divIcon({
html: innerMarker,
className: 'open_steet_map_marker',
iconSize: [0, 0],
popupAnchor: [0, -70],
iconAnchor: [24.5, 80],
})
}
);
eli_clusters.addLayer(marker);
eli_markers.push(marker);
eli_map.addLayer(eli_clusters);
marker.bindPopup('
New York
57 Leonard Igorevich St
', eli_jpopup_customOptions).openPopup();
$.get('https://nominatim.openstreetmap.org/search?format=json&q=', function(data){
if(typeof data[0] !='undefined'){
marker.setLatLng([data[0].lat, data[0].lon]).update();
eli_map.panTo(new L.LatLng(data[0].lat, data[0].lon));
}
}).success(function(){marker.openPopup();});
/* set center */
if(eli_markers.length && eli_markers.length > 1){
var limits_center = [];
for (var i in eli_markers) {
var latLngs = [ eli_markers[i].getLatLng() ];
limits_center.push(latLngs)
};
var bounds = L.latLngBounds(limits_center);
eli_map.fitBounds(bounds);
}
})