PATH:
home
/
letacommog
/
entrepro
/
wp-content
/
plugins
/
geo-my-wp
/
assets
/
js
var GMW_Map_Providers={};"google_maps"==gmwVars.mapsProvider&&(GMW_Map_Providers.google_maps={latLngBounds:function(o){return new google.maps.LatLngBounds},clearMarker:function(o,e){o.setMap(null)},polyline:function(o,e){return new google.maps.Polyline(o)},clearPolyline:function(o,e){o.setMap(null)},latLng:function(o,e,n){return new google.maps.LatLng(o,e)},addMarker:function(o,e){o.setMap(e.map)},renderUserInfoWindow:function(o,e,n){var i=n;i.userInfoWindow=new google.maps.InfoWindow({content:e,maxHeight:"15px"}),google.maps.event.addListener(o,"click",function(){i.userInfoWindow.open(i.map,o)}),1==i.userLocation.iw_open&&setTimeout(function(){i.userInfoWindow.open(i.map,i.userMarker)},500)},resizeMap:function(o,e){google.maps.event.trigger(o,"resize")},setCenter:function(o,e){e.map.setCenter(o)},getPosition:function(o,e){return o.getPosition()},getMapOptions:function(o){var e={};return e.center=new google.maps.LatLng(o.options.defaultCenter[0],o.options.defaultCenter[1]),e.mapTypeId=google.maps.MapTypeId[o.options.mapTypeId],e.mapTypeControlOptions={style:google.maps.MapTypeControlStyle.HORIZONTAL_BAR,position:google.maps.ControlPosition.TOP_CENTER},e.zoomControlOptions={position:google.maps.ControlPosition.RIGHT_CENTER},e.streetViewControlOptions={position:google.maps.ControlPosition.RIGHT_CENTER},e},Map:function(o,e,n){return new google.maps.Map(document.getElementById(n.mapElement),e)},mapLoaded:function(o){var e=o;google.maps.event.addListenerOnce(e.map,"idle",function(){if(jQuery("#gmw-map-loader-"+e.id).fadeOut(1e3),e.wrapElement.find(".gmw-map-cover").fadeOut(500),e.options.resizeMapControl&&0!=jQuery("#gmw-resize-map-toggle-"+e.id).length){var o=document.getElementById("gmw-resize-map-toggle-"+e.id);o.style.position="absolute",e.map.controls[google.maps.ControlPosition.TOP_RIGHT].push(o),o.style.display="block",e.fullScreenToggle()}google.maps.event.addListener(e.map,"click",function(o){e.closeInfoWindow()}),google.maps.event.addDomListener(e.map,"zoom_changed",function(o){}),e.renderUserMarker(),e.renderMarkers(e.locations,!1)})},renderMarker:function(o,e,n){var i=n,t={url:o.icon||i.iconUrl};e.icon_size?t.scaledSize=new google.maps.Size(parseInt(e.icon_size[0]),parseInt(e.icon_size[1])):(i.iconSize||t.url==gmwVars.defaultIcons.location_icon_url)&&(i.iconScaledSize||(i.iconSize?i.iconScaledSize=new google.maps.Size(parseInt(i.iconSize[0]),parseInt(i.iconSize[1])):i.iconScaledSize=new google.maps.Size(parseInt(gmwVars.defaultIcons.location_icon_size[0]),parseInt(gmwVars.defaultIcons.location_icon_size[1]))),t.scaledSize=i.iconScaledSize);var r={position:o.position,icon:t,map:i.map,animation:null,location_id:o.id,iw_content:o.content},a={markerCount:o.id,locationID:e.location_id||0,iwContent:o.content,objcetType:e.object_type||"",objectId:e.object_id||0};r=GMW.apply_filters("gmw_generate_marker_options",r,o.id,i);var s=new google.maps.Marker(r);return s.gmwData=a,s},setMarkerPosition:function(o,e,n){o.setPosition(postion)},moveMarker:function(o){var e=this,n=360/e.locations.length,t=o.lat()+-25e-6*Math.cos(+n*i/180*Math.PI),r=o.lng()+-25e-6*Math.sin(+n*i/180*Math.PI),a=e.latLng(t,r);return e.polylines.push(new google.maps.Polyline({path:[o,a],strokeColor:"#999999",strokeOpacity:1,strokeWeight:1,map:e.map})),a},markerGroupingTypes:{standard:{init:function(o){},addMarker:function(o,e){o.setMap(e.map)},markerClick:function(o,e){google.maps.event.addListener(o,"click",function(){e.markerClick(this)})}}},infoWindowTypes:{standard:{open:function(o,e){var n=e;if(o.gmwData.iwContent){var i=GMW.apply_filters("gmw_standard_info_window_options",{content:'<div class="gmw-info-window standard map-'+n.id+" "+n.prefix+'">'+o.gmwData.iwContent+"</div>",maxWidth:200,minWidth:200},n);n.activeInfoWindow=new google.maps.InfoWindow(i),n.activeInfoWindow.open(n.map,o)}},close:function(o){o.activeInfoWindow&&(o.activeInfoWindow.close(),o.activeInfoWindow=null)}}}}),"leaflet"==gmwVars.mapsProvider&&(GMW_Map_Providers.leaflet={latLngBounds:function(o){return L.latLngBounds()},clearMarker:function(o,e){o.remove()},polyline:function(o,e){return L.polygon(o.path,{color:o.strokeColor}).addTo(e)},clearPolyline:function(o,e){e.map.removeLayer(o)},latLng:function(o,e,n){return L.latLng(o,e)},addMarker:function(o,e){o.addTo(e.map)},renderUserInfoWindow:function(o,e,n){o.bindPopup(e),1==n.userLocation.iw_open&&setTimeout(function(){o.openPopup()},500)},resizeMap:function(o,e){o.invalidateSize()},setCenter:function(o,e){e.map.setView(o)},getPosition:function(o,e){return o.getLatLng()},getMapOptions:function(o){var e={};return e.markerClustersOptions={spiderfyOnMaxZoom:!0,showCoverageOnHover:!0,zoomToBoundsOnClick:!0,removeOutsideVisibleBounds:!0,animate:!0},e.markerSpiderfierOptions={keepSpiderfied:!0,nearbyDistance:20,circleSpiralSwitchover:9,legWeight:1.5},e.maxZoom=18,e.scrollWheelZoom=o.options.scrollwheel,e},moveMarker:function(o){var e=this,n=360/e.locations.length,t=o.lat+-5e-5*Math.cos(+n*i/180*Math.PI),r=o.lng+-5e-5*Math.sin(+n*i/180*Math.PI),a=e.latLng(t,r);return e.polylines.push(L.polygon([a,o],{color:"#999999",wight:"1"}).addTo(e.map)),a},Map:function(o,e,n){return L.map(o,e)},mapLoaded:function(o){var e=o;e.map.on("load",function(){jQuery("#gmw-map-loader-"+e.id).fadeOut(1e3),e.wrapElement.find(".gmw-map-cover").fadeOut(500),e.options.resizeMapControl&&0!=jQuery("#gmw-resize-map-toggle-"+e.id).length&&(jQuery("#gmw-resize-map-toggle-"+e.id).detach().appendTo(jQuery("#"+e.mapElement).find(".leaflet-top.leaflet-right")).addClass("leaflet-control leaflet-bar").show(),e.fullScreenToggle()),e.map.on("click dblclick,",function(o){e.closeInfoWindow()}),e.renderUserMarker(),e.renderMarkers(e.locations,!1)}),e.map.setView(e.options.defaultCenter),"undefined"!=typeof e.map.zoomControl&&e.map.zoomControl.setPosition("bottomright"),L.tileLayer(e.options.layersUrl,{attribution:e.options.layersAttribution}).addTo(e.map)},renderMarker:function(o,e,n){var i=n,t=o.icon||i.iconUrl,r=e.icon_size||i.iconSize||[25,41],a={iconUrl:t,iconSize:r,iconAnchor:[r[0]/2,r[1]],popupAnchor:[1,-r[1]]},s={iconOptions:a,position:o.position,location_id:o.id,iw_content:o.content},p={markerCount:o.id,locationID:e.location_id||0,iwContent:o.content,objcetType:e.object_type||"",objectId:e.object_id||0};s=GMW.apply_filters("gmw_generate_marker_options",s,o.id,o,this),s.icon=L.icon(s.iconOptions);var l=L.marker([o.position.lat,o.position.lng],s);return l.gmwData=p,l},setMarkerPosition:function(o,e,n){o.setLatLng(e)},markerGroupingTypes:{standard:{init:function(o){},addMarker:function(o,e){o.addTo(e.map)},markerClick:function(o,e){o.on("click",function(){e.markerClick(this)})},clear:function(){}}},infoWindowTypes:{standard:{open:function(o,e){var n=e;if(o.gmwData.iwContent){var i=GMW.apply_filters("gmw_standard_info_window_options",{content:'<div class="gmw-info-window standard map-'+n.id+" "+n.prefix+'">'+o.gmwData.iwContent+"</div>",maxWidth:200,minWidth:200},n);n.activeInfoWindow=L.popup(i).setContent(i.content),o.unbindPopup().bindPopup(n.activeInfoWindow).openPopup()}},close:function(o){o.activeInfoWindow&&(o.activeInfoWindow=null)}}}});var GMW_Maps={},GMW_Map=function(o,e,n){this.id=o.map_id,this.prefix=o.prefix,this.settings=o,this.provider=o.map_provider||"leaflet",this.gmw_form=n||!1,this.wrapElement=jQuery("#gmw-map-wrapper-"+this.id),this.mapElement="gmw-map-"+this.id,this.options=e||{zoom:8,mapTypeId:"ROADMAP"},this.map=!1,this.locations=[],this.previousLocations=[],this.markers=[],this.hideMapWithoutLocations=o.hide_no_locations||!1,this.activeInfoWindow=null,this.userLocation=!1,this.userPosition=!1,this.userInfoWindow=!1,this.clustersPath=o.clustersPath||"https://raw.githubusercontent.com/googlemaps/js-marker-clusterer/gh-pages/images/m",this.markerGrouping=o.group_markers||"standard",this.infoWindow=o.info_window_type||"standard",this.infoWindowAjax=o.info_window_ajax||!1,this.infoWindowTemplate=o.info_window_template||"default",this.userMarker=!1,this.clusters=!1,this.bounds=!1,this.activeMarker=null,this.polylines=[],this.autoZoomLevel=!1,this.zoomPosition=o.zoom_position||!1,this.iconUrl=o.icon_url||gmwVars.defaultIcons.location_icon_url,this.iconSize=o.icon_size||null,this.userIconSize=gmwVars.defaultIcons.user_location_icon_size,this.directions=null,this.coordsCollector=[],this.moveMarkerEnabled=!1,this.init()};GMW_Map.prototype.markerGroupingTypes={},GMW_Map.prototype.infoWindowTypes={},GMW_Map.prototype.init=function(){var o=this;return"undefined"==typeof GMW_Map_Providers[o.provider]?console.log("The map provider "+o.provider+" not exists."):(jQuery.extend(o,GMW_Map_Providers[o.provider]),o=GMW.apply_filters("gmw_map_init",o),"undefined"==typeof o.markerGroupingTypes[o.markerGrouping]&&(console.log(o.markerGrouping+' marker grouping function was not found. "Standard" will be used instead'),o.markerGrouping="standard"),"undefined"==typeof o.infoWindowTypes[o.infoWindow]&&(console.log(o.infoWindow+' info-window function was not found. "Standard" will be used instead'),o.infoWindow="standard"),void("google_maps"==o.provider?("standard"==o.markerGrouping||"markers_clusterer"==o.markerGrouping)&&(o.moveMarkersEnabled=!0):"leaflet"==o.provider&&"standard"==o.markerGrouping&&(o.moveMarkersEnabled=!0)))},GMW_Map.prototype.centerMap=function(){var o=this;if(0==o.zoomPosition||o.autoZoomLevel)1==o.locations.length&&0==o.userPosition?(o.autoZoomLevel?o.map.setZoom(13):o.map.setZoom(parseInt(o.options.zoom)),o.map.panTo(o.getPosition(o.markers[0],o))):o.autoZoomLevel||0==o.userPosition?(o.autoZoomLevel||0==o.userPosition)&&o.map.fitBounds(o.bounds):(o.map.setZoom(parseInt(o.options.zoom)),o.map.panTo(o.userPosition));else{var e=o.latLng(o.zoomPosition.lat,o.zoomPosition.lng,o);o.map.setZoom(parseInt(o.options.zoom)),o.map.panTo(e)}},GMW_Map.prototype.fullScreenToggle=function(o){var e=this;jQuery("#gmw-resize-map-toggle-"+e.id).on("click",function(){var o=e.map.getCenter();e.wrapElement.toggleClass("gmw-expanded-map"),e.wrapElement.hasClass("gmw-expanded-map")?jQuery("body, html").addClass("gmw-scroll-disabled"):jQuery("body, html").removeClass("gmw-scroll-disabled"),jQuery(this).toggleClass("gmw-icon-resize-full").toggleClass("gmw-icon-resize-small"),setTimeout(function(){e.resizeMap(e.map,e),e.setCenter(o,e)},100)})},GMW_Map.prototype.render=function(o,e){var n=this;if(jQuery("#"+n.mapElement).length){n.locations=o||n.locations,n.userLocation=e||n.userLocation,n.bounds=n.latLngBounds(n),"auto"==n.options.zoom?(n.autoZoomLevel=!0,n.options.zoom=13):(n.autoZoomLevel=!1,n.options.zoom=parseInt(n.options.zoom)),n.options.defaultCenter="undefined"!=typeof n.options.defaultCenter?n.options.defaultCenter.split(","):[40.758895,-73.985131],n.options=jQuery.extend({},n.options,n.getMapOptions(n)),n.options=GMW.apply_filters("gmw_map_options",n.options,n);var i;i=0==n.locations.length&&n.hideMapWithoutLocations?"slideUp":"slideDown",n.wrapElement[i]("fast",function(){n.map=n.Map(n.mapElement,n.options,n),n.mapLoaded(n)})}},GMW_Map.prototype.update=function(o,e,n){var i=this;return i.locations=o||i.locations,i.userLocation=e||i.userLocation,0==i.locations.length&&i.hideMapWithoutLocations?void this.wrapElement.slideUp():i.map===!1?void i.render(i.locations,i.userLocation):(i.bounds=i.latLngBounds(),i.closeInfoWindow(),void i.wrapElement.slideDown("fast",function(){i.resizeMap(i.map,i),i.clear(),i.clearUserMarker(),i.renderUserMarker(),i.renderMarkers(i.locations,n)}))},GMW_Map.prototype.clear=function(){for(var o=this,e=0;e<o.markers.length+1;e++)e<o.markers.length?o.markers[e]&&o.clearMarker(o.markers[e],o):(this.clearPolylines(),o.markers=[],o.coordsCollector=[],this.clearMarkersGrouping())},GMW_Map.prototype.clearPolylines=function(){for(var o=this,e=0;e<o.polylines.length+1;e++)e<this.polylines.length?o.clearPolyline(o.polylines[e],o):o.polylines=[]},GMW_Map.prototype.renderUserMarker=function(){var o=this;if(0!=o.userLocation&&"null"!=o.userLocation.lat&&"null"!=o.userLocation.lng&&0!=o.userLocation.lat&&0!=o.userLocation.lng&&"0"!=o.userLocation.map_icon&&""!=o.userLocation.map_icon){o.userPosition=o.latLng(o.userLocation.lat,o.userLocation.lng,o),o.bounds.extend(o.userPosition),("undefined"==typeof o.userLocation.map_icon||""==o.userLocation.map_icon)&&(o.userLocation.map_icon=gmwVars.defaultIcons.user_location_icon_url),o.userLocation.icon_size||o.userLocation.map_icon!=gmwVars.defaultIcons.user_location_icon_url||(o.userLocation.icon_size=o.userIconSize);var e={position:o.userPosition,icon:o.userLocation.map_icon,id:"user_marker",content:""};if(o.userMarker=o.renderMarker(e,o.userLocation,o),o.addMarker(o.userMarker,o),0!=o.userLocation.iw_content&&null!=o.userLocation.iw_content){var n='<div class="gmw-info-window user-marker map-'+o.id+" "+o.prefix+'"><span class="title">'+o.userLocation.iw_content+"</span></div>";o.renderUserInfoWindow(o.userMarker,n,o)}}},GMW_Map.prototype.clearUserMarker=function(){var o=this;0!=o.userMarker&&(o.clearMarker(o.userMarker,o),o.userMarker=!1,o.userPosition=!1)},GMW_Map.prototype.renderMarkers=function(o,e){var n=this;GMW.do_action("gmw_map_pre_render_markers",o,this),n.initMarkersGrouping(),n.locations=o,e&&0!=n.previousLocations.length?(temLoc=jQuery.merge(n.locations,n.previousLocations),n.previousLocations=n.locations,n.locations=temLoc):n.previousLocations=n.locations;var t=n.locations.length;for(0==t&&n.hideMapWithoutLocations&&this.wrapElement.slideUp(),i=0;i<t+1;i++)if(i<t){if(void 0==n.locations[i].lat||void 0==n.locations[i].lng||"0.000000"==n.locations[i].lat||"0.000000"==n.locations[i].lng)continue;var r=n.latLng(n.locations[i].lat,n.locations[i].lng,n);if(n.moveMarkersEnabled){var a=n.locations[i].lat+n.locations[i].lng;-1!=jQuery.inArray(a,n.coordsCollector)?r=n.moveMarker(r):n.coordsCollector.push(a)}n.bounds.extend(r),("undefined"==typeof n.locations[i].map_icon||""==n.locations[i].map_icon)&&(n.userLocation.map_icon=gmwVars.defaultIcons.location_icon_url);var s={position:r,icon:n.locations[i].map_icon,id:i,content:n.locations[i].info_window_content};n.markers[i]=n.renderMarker(s,n.locations[i],n),n.markerGroupingTypes[n.markerGrouping].addMarker(n.markers[i],n),n.markerGroupingTypes[n.markerGrouping].markerClick(n.markers[i],n),GMW.do_action("gmw_map_markers_loop_single_marker",n.markers[i],n.locations[i],n)}else GMW.do_action("gmw_map_after_render_markers",o,this),(t>0||0!=n.userMarker)&&n.centerMap()},GMW_Map.prototype.initMarkersGrouping=function(){var o=this;"normal"==o.markerGrouping&&(o.markerGrouping="standard"),GMW.do_action("gmw_markers_grouping_init",o.markerGrouping,o),o.markerGroupingTypes[o.markerGrouping].init(o)},GMW_Map.prototype.clearMarkersGrouping=function(){var o=this;"normal"==o.markerGrouping&&(o.markerGrouping="standard"),GMW.do_action("gmw_markers_grouping_clear",o.markerGrouping,o),"undefined"!=typeof o.markerGroupingTypes[o.markerGrouping].clear&&o.markerGroupingTypes[o.markerGrouping].clear(o)},GMW_Map.prototype.openInfoWindow=function(o){var e=this;e.activeMarker=o,GMW.do_action("gmw_map_pre_open_info_window",o,e),e.closeInfoWindow(),e.infoWindowTypes[e.infoWindow].open(o,e)},GMW_Map.prototype.closeInfoWindow=function(){var o=this;"function"==typeof o.userInfoWindow.close&&o.userInfoWindow.close(),GMW.do_action("gmw_map_pre_close_info_window",o.infoWindow,o),o.infoWindowTypes[o.infoWindow].close(o)},GMW_Map.prototype.markerClick=function(o){var e=this;GMW.do_action("gmw_map_marker_click",o,e),e.activeMarker=o,e.openInfoWindow(o)},GMW_Map.prototype.getIwTemplateName=function(o){return o.indexOf("custom_")>-1&&(o=o.replace("custom_","")+" custom"),o},jQuery(document).ready(function(o){"undefined"!=typeof gmwMapObjects&&jQuery.each(gmwMapObjects,function(o,e){e.settings.render_on_page_load&&(GMW_Maps[o]=new GMW_Map(e.settings,e.map_options,e.form),GMW_Maps[o].render(e.locations,e.user_location))})});
[+]
..
[-] gmw.directions.min.js
[edit]
[-] gmw.core.js
[edit]
[-] gmw.min.js
[edit]
[-] gmw.core.min.js
[edit]
[-] gmw.current.location.js
[edit]
[-] gmw.admin.js
[edit]
[-] gmw.map.min.js
[edit]
[-] gmw.geocoder.js
[edit]
[-] gmw.extensions.min.js
[edit]
[-] gmw.admin.min.js
[edit]
[-] gmw.js
[edit]
[-] gmw.map.js
[edit]
[-] gmw.directions.js
[edit]
[-] gmw.extensions.js
[edit]