PATH:
home
/
letacommog
/
laindinois
/
wp-content
/
plugins
/
dokan-pro
/
modules
/
geolocation
/
assets
/
js
!function(t){var e={};function r(o){if(e[o])return e[o].exports;var i=e[o]={i:o,l:!1,exports:{}};return t[o].call(i.exports,i,i.exports,r),i.l=!0,i.exports}r.m=t,r.c=e,r.d=function(t,e,o){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(r.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)r.d(o,i,function(e){return t[e]}.bind(null,i));return o},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=83)}({3:function(t,e){function r(e){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?t.exports=r=function(t){return typeof t}:t.exports=r=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(e)}t.exports=r},83:function(t,e,r){"use strict";r.r(e);var o=r(3),i=r.n(o);function s(t,e,r){this.extend(s,google.maps.OverlayView),this.map_=t,this.markers_=[],this.clusters_=[],this.sizes=[53,56,66,78,90],this.styles_=[],this.ready_=!1;var o=r||{};this.gridSize_=o.gridSize||60,this.minClusterSize_=o.minimumClusterSize||2,this.maxZoom_=o.maxZoom||null,this.styles_=o.styles||[],this.imagePath_=o.imagePath||this.MARKER_CLUSTER_IMAGE_PATH_,this.imageExtension_=o.imageExtension||this.MARKER_CLUSTER_IMAGE_EXTENSION_,this.zoomOnClick_=!0,null!=o.zoomOnClick&&(this.zoomOnClick_=o.zoomOnClick),this.averageCenter_=!1,null!=o.averageCenter&&(this.averageCenter_=o.averageCenter),this.setupStyles_(),this.setMap(t),this.prevZoom_=this.map_.getZoom();var i=this;google.maps.event.addListener(this.map_,"zoom_changed",(function(){var t=i.map_.getZoom(),e=i.map_.minZoom||0,r=Math.min(i.map_.maxZoom||100,i.map_.mapTypes[i.map_.getMapTypeId()].maxZoom);t=Math.min(Math.max(t,e),r),i.prevZoom_!=t&&(i.prevZoom_=t,i.resetViewport())})),google.maps.event.addListener(this.map_,"idle",(function(){i.redraw()})),e&&(e.length||Object.keys(e).length)&&this.addMarkers(e,!1)}function n(t){this.markerClusterer_=t,this.map_=t.getMap(),this.gridSize_=t.getGridSize(),this.minClusterSize_=t.getMinClusterSize(),this.averageCenter_=t.isAverageCenter(),this.center_=null,this.markers_=[],this.bounds_=null,this.clusterIcon_=new a(this,t.getStyles(),t.getGridSize())}function a(t,e,r){t.getMarkerClusterer().extend(a,google.maps.OverlayView),this.styles_=e,this.padding_=r||0,this.cluster_=t,this.center_=null,this.map_=t.getMap(),this.div_=null,this.sums_=null,this.visible_=!1,this.setMap(this.map_)}s.prototype.MARKER_CLUSTER_IMAGE_PATH_="../images/m",s.prototype.MARKER_CLUSTER_IMAGE_EXTENSION_="png",s.prototype.extend=function(t,e){return function(t){for(var e in t.prototype)this.prototype[e]=t.prototype[e];return this}.apply(t,[e])},s.prototype.onAdd=function(){this.setReady_(!0)},s.prototype.draw=function(){},s.prototype.setupStyles_=function(){if(!this.styles_.length)for(var t,e=0;t=this.sizes[e];e++)this.styles_.push({url:this.imagePath_+(e+1)+"."+this.imageExtension_,height:t,width:t})},s.prototype.fitMapToMarkers=function(){for(var t,e=this.getMarkers(),r=new google.maps.LatLngBounds,o=0;t=e[o];o++)r.extend(t.getPosition());this.map_.fitBounds(r)},s.prototype.setStyles=function(t){this.styles_=t},s.prototype.getStyles=function(){return this.styles_},s.prototype.isZoomOnClick=function(){return this.zoomOnClick_},s.prototype.isAverageCenter=function(){return this.averageCenter_},s.prototype.getMarkers=function(){return this.markers_},s.prototype.getTotalMarkers=function(){return this.markers_.length},s.prototype.setMaxZoom=function(t){this.maxZoom_=t},s.prototype.getMaxZoom=function(){return this.maxZoom_},s.prototype.calculator_=function(t,e){for(var r=0,o=t.length,i=o;0!==i;)i=parseInt(i/10,10),r++;return{text:o,index:r=Math.min(r,e)}},s.prototype.setCalculator=function(t){this.calculator_=t},s.prototype.getCalculator=function(){return this.calculator_},s.prototype.addMarkers=function(t,e){if(t.length)for(var r=0;o=t[r];r++)this.pushMarkerTo_(o);else if(Object.keys(t).length)for(var o in t)this.pushMarkerTo_(t[o]);e||this.redraw()},s.prototype.pushMarkerTo_=function(t){if(t.isAdded=!1,t.draggable){var e=this;google.maps.event.addListener(t,"dragend",(function(){t.isAdded=!1,e.repaint()}))}this.markers_.push(t)},s.prototype.addMarker=function(t,e){this.pushMarkerTo_(t),e||this.redraw()},s.prototype.removeMarker_=function(t){var e=-1;if(this.markers_.indexOf)e=this.markers_.indexOf(t);else for(var r,o=0;r=this.markers_[o];o++)if(r==t){e=o;break}return-1!=e&&(t.setMap(null),this.markers_.splice(e,1),!0)},s.prototype.removeMarker=function(t,e){var r=this.removeMarker_(t);return!(e||!r)&&(this.resetViewport(),this.redraw(),!0)},s.prototype.removeMarkers=function(t,e){for(var r,o=t===this.getMarkers()?t.slice():t,i=!1,s=0;r=o[s];s++){var n=this.removeMarker_(r);i=i||n}if(!e&&i)return this.resetViewport(),this.redraw(),!0},s.prototype.setReady_=function(t){this.ready_||(this.ready_=t,this.createClusters_())},s.prototype.getTotalClusters=function(){return this.clusters_.length},s.prototype.getMap=function(){return this.map_},s.prototype.setMap=function(t){this.map_=t},s.prototype.getGridSize=function(){return this.gridSize_},s.prototype.setGridSize=function(t){this.gridSize_=t},s.prototype.getMinClusterSize=function(){return this.minClusterSize_},s.prototype.setMinClusterSize=function(t){this.minClusterSize_=t},s.prototype.getExtendedBounds=function(t){var e=this.getProjection(),r=new google.maps.LatLng(t.getNorthEast().lat(),t.getNorthEast().lng()),o=new google.maps.LatLng(t.getSouthWest().lat(),t.getSouthWest().lng()),i=e.fromLatLngToDivPixel(r);i.x+=this.gridSize_,i.y-=this.gridSize_;var s=e.fromLatLngToDivPixel(o);s.x-=this.gridSize_,s.y+=this.gridSize_;var n=e.fromDivPixelToLatLng(i),a=e.fromDivPixelToLatLng(s);return t.extend(n),t.extend(a),t},s.prototype.isMarkerInBounds_=function(t,e){return e.contains(t.getPosition())},s.prototype.clearMarkers=function(){this.resetViewport(!0),this.markers_=[]},s.prototype.resetViewport=function(t){for(var e,r=0;e=this.clusters_[r];r++)e.remove();var o;for(r=0;o=this.markers_[r];r++)o.isAdded=!1,t&&o.setMap(null);this.clusters_=[]},s.prototype.repaint=function(){var t=this.clusters_.slice();this.clusters_.length=0,this.resetViewport(),this.redraw(),p.setTimeout((function(){for(var e,r=0;e=t[r];r++)e.remove()}),0)},s.prototype.redraw=function(){this.createClusters_()},s.prototype.distanceBetweenPoints_=function(t,e){if(!t||!e)return 0;var r=(e.lat()-t.lat())*Math.PI/180,o=(e.lng()-t.lng())*Math.PI/180,i=Math.sin(r/2)*Math.sin(r/2)+Math.cos(t.lat()*Math.PI/180)*Math.cos(e.lat()*Math.PI/180)*Math.sin(o/2)*Math.sin(o/2);return 6371*(2*Math.atan2(Math.sqrt(i),Math.sqrt(1-i)))},s.prototype.addToClosestCluster_=function(t){for(var e,r=4e4,o=null,i=(t.getPosition(),0);e=this.clusters_[i];i++){var s=e.getCenter();if(s){var a=this.distanceBetweenPoints_(s,t.getPosition());a<r&&(r=a,o=e)}}o&&o.isMarkerInClusterBounds(t)?o.addMarker(t):((e=new n(this)).addMarker(t),this.clusters_.push(e))},s.prototype.createClusters_=function(){if(this.ready_)for(var t,e=new google.maps.LatLngBounds(this.map_.getBounds().getSouthWest(),this.map_.getBounds().getNorthEast()),r=this.getExtendedBounds(e),o=0;t=this.markers_[o];o++)!t.isAdded&&this.isMarkerInBounds_(t,r)&&this.addToClosestCluster_(t)},n.prototype.isMarkerAlreadyAdded=function(t){if(this.markers_.indexOf)return-1!=this.markers_.indexOf(t);for(var e,r=0;e=this.markers_[r];r++)if(e==t)return!0;return!1},n.prototype.addMarker=function(t){if(this.isMarkerAlreadyAdded(t))return!1;if(this.center_){if(this.averageCenter_){var e=this.markers_.length+1,r=(this.center_.lat()*(e-1)+t.getPosition().lat())/e,o=(this.center_.lng()*(e-1)+t.getPosition().lng())/e;this.center_=new google.maps.LatLng(r,o),this.calculateBounds_()}}else this.center_=t.getPosition(),this.calculateBounds_();t.isAdded=!0,this.markers_.push(t);var i=this.markers_.length;if(i<this.minClusterSize_&&t.getMap()!=this.map_&&t.setMap(this.map_),i==this.minClusterSize_)for(var s=0;s<i;s++)this.markers_[s].setMap(null);return i>=this.minClusterSize_&&t.setMap(null),this.updateIcon(),!0},n.prototype.getMarkerClusterer=function(){return this.markerClusterer_},n.prototype.getBounds=function(){for(var t,e=new google.maps.LatLngBounds(this.center_,this.center_),r=this.getMarkers(),o=0;t=r[o];o++)e.extend(t.getPosition());return e},n.prototype.remove=function(){this.clusterIcon_.remove(),this.markers_.length=0,delete this.markers_},n.prototype.getSize=function(){return this.markers_.length},n.prototype.getMarkers=function(){return this.markers_},n.prototype.getCenter=function(){return this.center_},n.prototype.calculateBounds_=function(){var t=new google.maps.LatLngBounds(this.center_,this.center_);this.bounds_=this.markerClusterer_.getExtendedBounds(t)},n.prototype.isMarkerInClusterBounds=function(t){return this.bounds_.contains(t.getPosition())},n.prototype.getMap=function(){return this.map_},n.prototype.updateIcon=function(){var t=this.map_.getZoom(),e=this.markerClusterer_.getMaxZoom();if(e&&t>e)for(var r,o=0;r=this.markers_[o];o++)r.setMap(this.map_);else if(this.markers_.length<this.minClusterSize_)this.clusterIcon_.hide();else{var i=this.markerClusterer_.getStyles().length,s=this.markerClusterer_.getCalculator()(this.markers_,i);this.clusterIcon_.setCenter(this.center_),this.clusterIcon_.setSums(s),this.clusterIcon_.show()}},a.prototype.triggerClusterClick=function(){var t=this.cluster_.getMarkerClusterer();google.maps.event.trigger(t.map_,"clusterclick",this.cluster_),t.isZoomOnClick()&&this.map_.fitBounds(this.cluster_.getBounds())},a.prototype.onAdd=function(){if(this.div_=document.createElement("DIV"),this.visible_){var t=this.getPosFromLatLng_(this.center_);this.div_.style.cssText=this.createCss(t),this.div_.innerHTML=this.sums_.text}this.getPanes().overlayMouseTarget.appendChild(this.div_);var e=this;google.maps.event.addDomListener(this.div_,"click",(function(){e.triggerClusterClick()}))},a.prototype.getPosFromLatLng_=function(t){var e=this.getProjection().fromLatLngToDivPixel(t);return e.x-=parseInt(this.width_/2,10),e.y-=parseInt(this.height_/2,10),e},a.prototype.draw=function(){if(this.visible_){var t=this.getPosFromLatLng_(this.center_);this.div_.style.top=t.y+"px",this.div_.style.left=t.x+"px",this.div_.style.zIndex=google.maps.Marker.MAX_ZINDEX+1}},a.prototype.hide=function(){this.div_&&(this.div_.style.display="none"),this.visible_=!1},a.prototype.show=function(){if(this.div_){var t=this.getPosFromLatLng_(this.center_);this.div_.style.cssText=this.createCss(t),this.div_.style.display=""}this.visible_=!0},a.prototype.remove=function(){this.setMap(null)},a.prototype.onRemove=function(){this.div_&&this.div_.parentNode&&(this.hide(),this.div_.parentNode.removeChild(this.div_),this.div_=null)},a.prototype.setSums=function(t){this.sums_=t,this.text_=t.text,this.index_=t.index,this.div_&&(this.div_.innerHTML=t.text),this.useStyle()},a.prototype.useStyle=function(){var t=Math.max(0,this.sums_.index-1);t=Math.min(this.styles_.length-1,t);var e=this.styles_[t];this.url_=e.url,this.height_=e.height,this.width_=e.width,this.textColor_=e.textColor,this.anchor_=e.anchor,this.textSize_=e.textSize,this.backgroundPosition_=e.backgroundPosition,this.backgroundSize_=e.backgroundSize},a.prototype.setCenter=function(t){this.center_=t},a.prototype.createCss=function(t){var e=[];e.push("background-image:url("+this.url_+");");var r=this.backgroundPosition_?this.backgroundPosition_:"0 0";e.push("background-position:"+r+";");var o=this.backgroundSize_?this.backgroundSize_:"contain";e.push("background-size:"+o+";"),"object"===i()(this.anchor_)?("number"==typeof this.anchor_[0]&&this.anchor_[0]>0&&this.anchor_[0]<this.height_?e.push("height:"+(this.height_-this.anchor_[0])+"px; padding-top:"+this.anchor_[0]+"px;"):e.push("height:"+this.height_+"px; line-height:"+this.height_+"px;"),"number"==typeof this.anchor_[1]&&this.anchor_[1]>0&&this.anchor_[1]<this.width_?e.push("width:"+(this.width_-this.anchor_[1])+"px; padding-left:"+this.anchor_[1]+"px;"):e.push("width:"+this.width_+"px; text-align:center;")):e.push("height:"+this.height_+"px; line-height:"+this.height_+"px; width:"+this.width_+"px; text-align:center;");var s=this.textColor_?this.textColor_:"black",n=this.textSize_?this.textSize_:11;return e.push("cursor:pointer; top:"+t.y+"px; left:"+t.x+"px; color:"+s+"; position:absolute; font-size:"+n+"px; font-family:Arial,sans-serif; font-weight:bold"),e.join("")};var p=p||{};p.MarkerClusterer=s,s.prototype.addMarker=s.prototype.addMarker,s.prototype.addMarkers=s.prototype.addMarkers,s.prototype.clearMarkers=s.prototype.clearMarkers,s.prototype.fitMapToMarkers=s.prototype.fitMapToMarkers,s.prototype.getCalculator=s.prototype.getCalculator,s.prototype.getGridSize=s.prototype.getGridSize,s.prototype.getExtendedBounds=s.prototype.getExtendedBounds,s.prototype.getMap=s.prototype.getMap,s.prototype.getMarkers=s.prototype.getMarkers,s.prototype.getMaxZoom=s.prototype.getMaxZoom,s.prototype.getStyles=s.prototype.getStyles,s.prototype.getTotalClusters=s.prototype.getTotalClusters,s.prototype.getTotalMarkers=s.prototype.getTotalMarkers,s.prototype.redraw=s.prototype.redraw,s.prototype.removeMarker=s.prototype.removeMarker,s.prototype.removeMarkers=s.prototype.removeMarkers,s.prototype.resetViewport=s.prototype.resetViewport,s.prototype.repaint=s.prototype.repaint,s.prototype.setCalculator=s.prototype.setCalculator,s.prototype.setGridSize=s.prototype.setGridSize,s.prototype.setMaxZoom=s.prototype.setMaxZoom,s.prototype.onAdd=s.prototype.onAdd,s.prototype.draw=s.prototype.draw,n.prototype.getCenter=n.prototype.getCenter,n.prototype.getSize=n.prototype.getSize,n.prototype.getMarkers=n.prototype.getMarkers,a.prototype.onAdd=a.prototype.onAdd,a.prototype.draw=a.prototype.draw,a.prototype.onRemove=a.prototype.onRemove,Object.keys=Object.keys||function(t){var e=[];for(var r in t)t.hasOwnProperty(r)&&e.push(r);return e};var h,u=s;h=jQuery,DokanGeo.LocationsMaps={map:null,markers:[],marker_clusterer:null,info_window:null,init:function(){var t=this,e=h("#dokan-geolocation-locations-map");t.map=new google.maps.Map(e.get(0),{zoom:parseInt(DokanGeo.map_zoom,10),mapTypeId:google.maps.MapTypeId.ROADMAP}),t.info_window=new google.maps.InfoWindow,t.setMarkers(),t.map.addListener("clusterclick",(function(e){var r=e.getBounds(),o=e.getMarkers(),i=Object.keys(r),s=Object.keys(r[i[0]]);if(r[i[0]][s[0]]===r[i[0]][s[1]]){var n='<div class="white-popup dokan-geo-map-info-windows-in-popup">';o.forEach((function(e){n+=t.getInfoWindowContent(e.info)})),n+="</div>",h.magnificPopup.open({items:{type:"inline",src:n}})}}))},setMarkers:function(){var t=h('[name="dokan_geolocation[]"]');if(t.length){var e=this,r=new google.maps.LatLngBounds,o={url:DokanGeo.marker.image,scaledSize:new google.maps.Size(32,32)};e.marker_clusterer&&e.marker_clusterer.clearMarkers(),e.markers=[],t.each((function(){h(this).val();var t=h(this).data("latitude"),i=h(this).data("longitude"),s=h(this).data("info"),n=new google.maps.LatLng(t,i);r.extend(n);var a={position:n,map:e.map,info:s};DokanGeo.marker.image&&(a.icon=o);var p=new google.maps.Marker(a);p.addListener("click",(function(){if(s){var t=e.getInfoWindowContent(s);e.info_window.setContent(t),e.info_window.open(e.map,p),e.map.panTo(n)}})),e.markers.push(p)})),e.map.setCenter(r.getCenter()),l=0;var i=[];for(l=0;l<5;l++)i.push({url:DokanGeo.marker.clusterer,height:40,width:40,textColor:"#fddace",textSize:13,backgroundSize:"40px"});e.marker_clusterer=new u(e.map,e.markers,{gridSize:40,styles:i})}else{var s=window.location.search,n=DokanGeo.default_geolocation.latitude,a=DokanGeo.default_geolocation.longitude,p=s.replace("?","").split("&"),l=0;if(p.length){var d="",c="",_="";for(l=0;l<p.length;l++)c=(d=p[l].split("="))[0].toLowerCase(),_=d[1],"latitude"===c?n=_:"longitude"===c&&(a=_)}this.map.setCenter(new google.maps.LatLng(n,a))}},getInfoWindowContent:function(t){var e,r=DokanGeo.info_window_template;for(e in t)r=r.replace("{"+e+"}",t[e]);return r}},h("#dokan-geolocation-locations-map").length&&DokanGeo.LocationsMaps.init()}});
[+]
..
[-] geolocation-vendor-dashboard-product-google-maps.js
[edit]
[-] geolocation.js
[edit]
[-] dokan-geolocation-store-lists-filters.js
[edit]
[-] geolocation-vendor-dashboard-product-mapbox.js
[edit]
[-] dokan-geolocation-locations-map-mapbox.js
[edit]
[-] dokan-geolocation-locations-map.js
[edit]
[-] dokan-geolocation-filters.js
[edit]
[-] dokan-geolocation-locations-map-google-maps.js
[edit]