PageSourceSearch

https://curtet-immobilier.ch/wp-content/themes/wpresidence/js/google_js/markerclusterer.min.js?ver=1.0

js curtet-immobilier.ch collected 2026-10-05 07:58:36 UTC 16,754 bytes, 2 lines download raw bytes

1
2function ClusterIcon(a,b){a.getMarkerClusterer().extend(ClusterIcon,google.maps.OverlayView);this.cluster_=a;this.className_=a.getMarkerClusterer().getClusterClass();this.styles_=b;this.center_=null;this.div_=null;this.sums_=null;this.visible_=false;this.setMap(a.getMap())}ClusterIcon.prototype.onAdd=function(){var c=this;var a;var b;this.div_=document.createElement("div");this.div_.className=this.className_;if(this.visible_){this.show()}this.getPanes().overlayMouseTarget.appendChild(this.div_);this.boundsChangedListener_=google.maps.event.addListener(this.getMap(),"bounds_changed",function(){b=a});google.maps.event.addDomListener(this.div_,"mousedown",function(){a=true;b=false});google.maps.event.addDomListener(this.div_,"click",function(h){a=false;if(!b){var d;var f;var g=c.cluster_.getMarkerClusterer();google.maps.event.trigger(g,"click",c.cluster_);google.maps.event.trigger(g,"clusterclick",c.cluster_);if(g.getZoomOnClick()){f=g.getMaxZoom();d=c.cluster_.getBounds();g.getMap().fitBounds(d);setTimeout(function(){g.getMap().fitBounds(d);if(f!==null&&(g.getMap().getZoom()>f)){g.getMap().setZoom(f+1)}},100)}h.cancelBubble=true;if(h.stopPropagation){h.stopPropagation()}}});google.maps.event.addDomListener(this.div_,"mouseover",function(){var d=c.cluster_.getMarkerClusterer();google.maps.event.trigger(d,"mouseover",c.cluster_)});google.maps.event.addDomListener(this.div_,"mouseout",function(){var d=c.cluster_.getMarkerClusterer();google.maps.event.trigger(d,"mouseout",c.cluster_)})};ClusterIcon.prototype.onRemove=function(){if(this.div_&&this.div_.parentNode){this.hide();google.maps.event.removeListener(this.boundsChangedListener_);google.maps.event.clearInstanceListeners(this.div_);this.div_.parentNode.removeChild(this.div_);this.div_=null}};ClusterIcon.prototype.draw=function(){if(this.visible_){var a=this.getPosFromLatLng_(this.center_);this.div_.style.top=a.y+"px";this.div_.style.left=a.x+"px"}};ClusterIcon.prototype.hide=function(){if(this.div_){this.div_.style.display="none"}this.visible_=false};ClusterIcon.prototype.show=function(){if(this.div_){var a="";var c=this.backgroundPosition_.split(" ");var d=parseInt(c[0].trim(),10);var b=parseInt(c[1].trim(),10);var e=this.getPosFromLatLng_(this.center_);this.div_.style.cssText=this.createCss(e);a="<img src='"+this.url_+"' style='position: absolute; top: "+b+"px; left: "+d+"px; ";if(!this.cluster_.getMarkerClusterer().enableRetinaIcons_){a+="clip: rect("+(-1*b)+"px, "+((-1*d)+this.width_)+"px, "+((-1*b)+this.height_)+"px, "+(-1*d)+"px);"}a+="'>";this.div_.innerHTML=a+"<div style='position: absolute;top: "+this.anchorText_[0]+"px;left: "+this.anchorText_[1]+"px;color: "+this.textColor_+";font-size: "+this.textSize_+"px;font-family: "+this.fontFamily_+";font-weight: "+this.fontWeight_+";font-style: "+this.fontStyle_+";text-decoration: "+this.textDecoration_+";text-align: center;width: "+this.width_+"px;line-height:"+this.height_+"px;'>"+this.sums_.text+"</div>";if(typeof this.sums_.title==="undefined"||this.sums_.title===""){this.div_.title=this.cluster_.getMarkerClusterer().getTitle()}else{this.div_.title=this.sums_.title}this.div_.style.display=""}this.visible_=true};ClusterIcon.prototype.useStyle=function(b){this.sums_=b;var a=Math.max(0,b.index-1);a=Math.min(this.styles_.length-1,a);var c=this.styles_[a];this.url_=c.url;this.height_=c.height;this.width_=c.width;this.anchorText_=c.anchorText||[0,0];this.anchorIcon_=c.anchorIcon||[parseInt(this.height_/2,10),parseInt(this.width_/2,10)];this.textColor_=c.textColor||"black";this.textSize_=c.textSize||11;this.textDecoration_=c.textDecoration||"none";this.fontWeight_=c.fontWeight||"bold";this.fontStyle_=c.fontStyle||"normal";this.fontFamily_=c.fontFamily||"Arial,sans-serif";this.backgroundPosition_=c.backgroundPosition||"0 0"};ClusterIcon.prototype.setCenter=function(a){this.center_=a};ClusterIcon.prototype.createCss=function(b){var a=[];a.push("cursor: pointer;");a.push("position: absolute; top: "+b.y+"px; left: "+b.x+"px;");a.push("width: "+this.width_+"px; height: "+this.height_+"px;");return a.join("")};ClusterIcon.prototype.getPosFromLatLng_=function(b){var a=this.getProjection().fromLatLngToDivPixel(b);a.x-=this.anchorIcon_[1];a.y-=this.anchorIcon_[0];a.x=parseInt(a.x,10);a.y=parseInt(a.y,10);return a};function Cluster(a){this.markerClusterer_=a;this.map_=a.getMap();this.gridSize_=a.getGridSize();this.minClusterSize_=a.getMinimumClusterSize();this.averageCenter_=a.getAverageCenter();this.markers_=[];this.center_=null;this.bounds_=null;this.clusterIcon_=new ClusterIcon(this,a.getStyles())}Cluster.prototype.getSize=function(){return this.markers_.length};Cluster.prototype.getMarkers=function(){return this.markers_};Cluster.prototype.getCenter=function(){return this.center_};Cluster.prototype.getMap=function(){return this.map_};Cluster.prototype.getMarkerClusterer=function(){return this.markerClusterer_};Cluster.prototype.getBounds=function(){var a;var b=new google.maps.LatLngBounds(this.center_,this.center_);var c=this.getMarkers();for(a=0;a<c.length;a++){b.extend(c[a].getPosition())}return b};Cluster.prototype.remove=function(){this.clusterIcon_.setMap(null);this.markers_=[];delete this.markers_};Cluster.prototype.addMarker=function(b){var e;var d;var f;if(this.isMarkerAlreadyAdded_(b)){return false}if(!this.center_){this.center_=b.getPosition();this.calculateBounds_()}else{if(this.averageCenter_){var a=this.markers_.length+1;var g=(this.center_.lat()*(a-1)+b.getPosition().lat())/a;var c=(this.center_.lng()*(a-1)+b.getPosition().lng())/a;this.center_=new google.maps.LatLng(g,c);this.calculateBounds_()}}b.isAdded=true;this.markers_.push(b);d=this.markers_.length;f=this.markerClusterer_.getMaxZoom();if(f!==null&&this.map_.getZoom()>f){if(b.getMap()!==this.map_){b.setMap(this.map_)}}else{if(d<this.minClusterSize_){if(b.getMap()!==this.map_){b.setMap(this.map_)}}else{if(d===this.minClusterSize_){for(e=0;e<d;e++){this.markers_[e].setMap(null)}}else{b.setMap(null)}}}this.updateIcon_();return true};Cluster.prototype.isMarkerInClusterBounds=function(a){return this.bounds_.contains(a.getPosition())};Cluster.prototype.calculateBounds_=function(){var a=new google.maps.LatLngBounds(this.center_,this.center_);this.bounds_=this.markerClusterer_.getExtendedBounds(a)};Cluster.prototype.updateIcon_=function(){var b=this.markers_.length;var d=this.markerClusterer_.getMaxZoom();if(d!==null&&this.map_.getZoom()>d){this.clusterIcon_.hide();return}if(b<this.minClusterSize_){this.clusterIcon_.hide();return}var c=this.markerClusterer_.getStyles().length;var a=this.markerClusterer_.getCalculator()(this.markers_,c);this.clusterIcon_.setCenter(this.center_);this.clusterIcon_.useStyle(a);this.clusterIcon_.show()};Cluster.prototype.isMarkerAlreadyAdded_=function(a){var b;if(this.markers_.indexOf){return this.markers_.indexOf(a)!==-1}else{for(b=0;b<this.markers_.length;b++){if(a===this.markers_[b]){return true}}}return false};function MarkerClusterer(c,a,b){this.extend(MarkerClusterer,google.maps.OverlayView);a=a||[];b=b||{};this.markers_=[];
2this.clusters_=[];this.listeners_=[];this.activeMap_=null;this.ready_=false;this.gridSize_=b.gridSize||60;this.minClusterSize_=b.minimumClusterSize||2;this.maxZoom_=b.maxZoom||null;this.styles_=b.styles||[];this.title_=b.title||"";this.zoomOnClick_=true;if(b.zoomOnClick!==undefined){this.zoomOnClick_=b.zoomOnClick}this.averageCenter_=false;if(b.averageCenter!==undefined){this.averageCenter_=b.averageCenter}this.ignoreHidden_=false;if(b.ignoreHidden!==undefined){this.ignoreHidden_=b.ignoreHidden}this.enableRetinaIcons_=false;if(b.enableRetinaIcons!==undefined){this.enableRetinaIcons_=b.enableRetinaIcons}this.imagePath_=b.imagePath||MarkerClusterer.IMAGE_PATH;this.imageExtension_=b.imageExtension||MarkerClusterer.IMAGE_EXTENSION;this.imageSizes_=b.imageSizes||MarkerClusterer.IMAGE_SIZES;this.calculator_=b.calculator||MarkerClusterer.CALCULATOR;this.batchSize_=b.batchSize||MarkerClusterer.BATCH_SIZE;this.batchSizeIE_=b.batchSizeIE||MarkerClusterer.BATCH_SIZE_IE;this.clusterClass_=b.clusterClass||"cluster";if(navigator.userAgent.toLowerCase().indexOf("msie")!==-1){this.batchSize_=this.batchSizeIE_}this.setupStyles_();this.addMarkers(a,true);this.setMap(c)}MarkerClusterer.prototype.onAdd=function(){var a=this;this.activeMap_=this.getMap();this.ready_=true;this.repaint();this.listeners_=[google.maps.event.addListener(this.getMap(),"zoom_changed",function(){a.resetViewport_(false);if(this.getZoom()===(this.get("minZoom")||0)||this.getZoom()===this.get("maxZoom")){google.maps.event.trigger(this,"idle")}}),google.maps.event.addListener(this.getMap(),"idle",function(){a.redraw_()})]};MarkerClusterer.prototype.onRemove=function(){var a;for(a=0;a<this.markers_.length;a++){if(this.markers_[a].getMap()!==this.activeMap_){this.markers_[a].setMap(this.activeMap_)}}for(a=0;
2a<this.clusters_.length;a++){this.clusters_[a].remove()}this.clusters_=[];for(a=0;a<this.listeners_.length;a++){google.maps.event.removeListener(this.listeners_[a])}this.listeners_=[];this.activeMap_=null;this.ready_=false};MarkerClusterer.prototype.draw=function(){};MarkerClusterer.prototype.setupStyles_=function(){var b,a;if(this.styles_.length>0){return}for(b=0;b<this.imageSizes_.length;b++){a=this.imageSizes_[b];this.styles_.push({url:this.imagePath_+(b+1)+"."+this.imageExtension_,height:a,width:a})}};MarkerClusterer.prototype.fitMapToMarkers=function(){var a;var c=this.getMarkers();var b=new google.maps.LatLngBounds();for(a=0;a<c.length;a++){b.extend(c[a].getPosition())}this.getMap().fitBounds(b)};MarkerClusterer.prototype.getGridSize=function(){return this.gridSize_};MarkerClusterer.prototype.setGridSize=function(a){this.gridSize_=a};MarkerClusterer.prototype.getMinimumClusterSize=function(){return this.minClusterSize_};MarkerClusterer.prototype.setMinimumClusterSize=function(a){this.minClusterSize_=a};MarkerClusterer.prototype.getMaxZoom=function(){return this.maxZoom_};MarkerClusterer.prototype.setMaxZoom=function(a){this.maxZoom_=a};MarkerClusterer.prototype.getStyles=function(){return this.styles_};MarkerClusterer.prototype.setStyles=function(a){this.styles_=a};MarkerClusterer.prototype.getTitle=function(){return this.title_};MarkerClusterer.prototype.setTitle=function(a){this.title_=a};MarkerClusterer.prototype.getZoomOnClick=function(){return this.zoomOnClick_};MarkerClusterer.prototype.setZoomOnClick=function(a){this.zoomOnClick_=a};MarkerClusterer.prototype.getAverageCenter=function(){return this.averageCenter_};MarkerClusterer.prototype.setAverageCenter=function(a){this.averageCenter_=a};MarkerClusterer.prototype.getIgnoreHidden=function(){return this.ignoreHidden_};MarkerClusterer.prototype.setIgnoreHidden=function(a){this.ignoreHidden_=a};MarkerClusterer.prototype.getEnableRetinaIcons=function(){return this.enableRetinaIcons_};MarkerClusterer.prototype.setEnableRetinaIcons=function(a){this.enableRetinaIcons_=a};MarkerClusterer.prototype.getImageExtension=function(){return this.imageExtension_};MarkerClusterer.prototype.setImageExtension=function(a){this.imageExtension_=a};MarkerClusterer.prototype.getImagePath=function(){return this.imagePath_};MarkerClusterer.prototype.setImagePath=function(a){this.imagePath_=a};MarkerClusterer.prototype.getImageSizes=function(){return this.imageSizes_};MarkerClusterer.prototype.setImageSizes=function(a){this.imageSizes_=a};MarkerClusterer.prototype.getCalculator=function(){return this.calculator_};MarkerClusterer.prototype.setCalculator=function(a){this.calculator_=a};MarkerClusterer.prototype.getBatchSizeIE=function(){return this.batchSizeIE_};MarkerClusterer.prototype.setBatchSizeIE=function(a){this.batchSizeIE_=a};MarkerClusterer.prototype.getClusterClass=function(){return this.clusterClass_};MarkerClusterer.prototype.setClusterClass=function(a){this.clusterClass_=a};MarkerClusterer.prototype.getMarkers=function(){return this.markers_};MarkerClusterer.prototype.getTotalMarkers=function(){return this.markers_.length};MarkerClusterer.prototype.getClusters=function(){return this.clusters_};MarkerClusterer.prototype.getTotalClusters=function(){return this.clusters_.length};MarkerClusterer.prototype.addMarker=function(a,b){this.pushMarkerTo_(a);if(!b){this.redraw_()}};MarkerClusterer.prototype.addMarkers=function(c,b){var a;for(a in c){if(c.hasOwnProperty(a)){this.pushMarkerTo_(c[a])}}if(!b){this.redraw_()}};MarkerClusterer.prototype.pushMarkerTo_=function(a){if(a.getDraggable()){var b=this;google.maps.event.addListener(a,"dragend",function(){if(b.ready_){this.isAdded=false;b.repaint()}})}a.isAdded=false;this.markers_.push(a)};MarkerClusterer.prototype.removeMarker=function(a,b){var c=this.removeMarker_(a);if(!b&&c){this.repaint()}return c};MarkerClusterer.prototype.wpestate_removeMarkers=function(e,b){var a,c;var d=false;for(a=0;a<e.length;a++){c=this.removeMarker_(e[a]);d=d||c}if(!b&&d){this.repaint()}return d};MarkerClusterer.prototype.removeMarker_=function(a){var c;var b=-1;if(this.markers_.indexOf){b=this.markers_.indexOf(a)}else{for(c=0;c<this.markers_.length;
2c++){if(a===this.markers_[c]){b=c;break}}}if(b===-1){return false}a.setMap(null);this.markers_.splice(b,1);return true};MarkerClusterer.prototype.clearMarkers=function(){this.resetViewport_(true);this.markers_=[]};MarkerClusterer.prototype.repaint=function(){var a=this.clusters_.slice();this.clusters_=[];this.resetViewport_(false);this.redraw_();setTimeout(function(){var b;for(b=0;b<a.length;b++){a[b].remove()}},0)};MarkerClusterer.prototype.getExtendedBounds=function(e){var c=this.getProjection();var f=new google.maps.LatLng(e.getNorthEast().lat(),e.getNorthEast().lng());var h=new google.maps.LatLng(e.getSouthWest().lat(),e.getSouthWest().lng());var d=c.fromLatLngToDivPixel(f);d.x+=this.gridSize_;d.y-=this.gridSize_;var b=c.fromLatLngToDivPixel(h);b.x-=this.gridSize_;b.y+=this.gridSize_;var g=c.fromDivPixelToLatLng(d);var a=c.fromDivPixelToLatLng(b);e.extend(g);e.extend(a);return e};MarkerClusterer.prototype.redraw_=function(){this.createClusters_(0)};MarkerClusterer.prototype.resetViewport_=function(c){var b,a;for(b=0;
2b<this.clusters_.length;b++){this.clusters_[b].remove()}this.clusters_=[];for(b=0;b<this.markers_.length;b++){a=this.markers_[b];a.isAdded=false;if(c){a.setMap(null)}}};MarkerClusterer.prototype.distanceBetweenPoints_=function(j,h){var g=6371;var e=(h.lat()-j.lat())*Math.PI/180;var f=(h.lng()-j.lng())*Math.PI/180;var b=Math.sin(e/2)*Math.sin(e/2)+Math.cos(j.lat()*Math.PI/180)*Math.cos(h.lat()*Math.PI/180)*Math.sin(f/2)*Math.sin(f/2);var k=2*Math.atan2(Math.sqrt(b),Math.sqrt(1-b));var i=g*k;return i};MarkerClusterer.prototype.isMarkerInBounds_=function(a,b){return b.contains(a.getPosition())};MarkerClusterer.prototype.addToClosestCluster_=function(c){var f,g,b,a;var h=40000;var e=null;for(f=0;f<this.clusters_.length;f++){b=this.clusters_[f];a=b.getCenter();if(a){g=this.distanceBetweenPoints_(a,c.getPosition());if(g<h){h=g;e=b}}}if(e&&e.isMarkerInClusterBounds(c)){e.addMarker(c)}else{b=new Cluster(this);b.addMarker(c);this.clusters_.push(b)}};MarkerClusterer.prototype.createClusters_=function(a){var e,c;var b;var d=this;if(!this.ready_){return}if(a===0){google.maps.event.trigger(this,"clusteringbegin",this);if(typeof this.timerRefStatic!=="undefined"){clearTimeout(this.timerRefStatic);delete this.timerRefStatic}}if(this.getMap().getZoom()>3){b=new google.maps.LatLngBounds(this.getMap().getBounds().getSouthWest
2(),this.getMap().getBounds().getNorthEast())}else{b=new google.maps.LatLngBounds(new google.maps.LatLng(85.02070771743472,-178.48388434375),new google.maps.LatLng(-85.08136444384544,178.00048865625))}var g=this.getExtendedBounds(b);var f=Math.min(a+this.batchSize_,this.markers_.length);for(e=a;e<f;e++){c=this.markers_[e];if(!c.isAdded&&this.isMarkerInBounds_(c,g)){if(!this.ignoreHidden_||(this.ignoreHidden_&&c.getVisible())){this.addToClosestCluster_(c)}}}if(f<this.markers_.length){this.timerRefStatic=setTimeout(function(){d.createClusters_(f)},0)}else{delete this.timerRefStatic;google.maps.event.trigger(this,"clusteringend",this)}};MarkerClusterer.prototype.extend=function(b,a){return(function(c){var d;for(d in c.prototype){this.prototype[d]=c.prototype[d]}return this}).apply(b,[a])};MarkerClusterer.CALCULATOR=function(f,d){var a=0;var e="";var c=f.length.toString();var b=c;while(b!==0){b=parseInt(b/10,10);a++}a=Math.min(a,d);return{text:c,index:a,title:e}};MarkerClusterer.BATCH_SIZE=2000;MarkerClusterer.BATCH_SIZE_IE=500;MarkerClusterer.IMAGE_PATH="http://google-maps-utility-library-v3.googlecode.com/svn/trunk/markerclustererplus/images/m";MarkerClusterer.IMAGE_EXTENSION="png";MarkerClusterer.IMAGE_SIZES=[53,56,66,78,90];if(typeof String.prototype.trim!=="function"){String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")}};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.