Commits

Alexander Shabunevich committed 0816120

Init repaint only if there are some markers [ver 1.1.2].

Comments (0)

Files changed (3)

yandex.clusterer.js

 /**
  * @name YandexClusterer for Yandex Maps.
- * @version 1.1.1 [March 02, 2012]
+ * @version 1.1.2 [May 03, 2012]
  * @author Alexander Shabunevich [http://aether.ru]
  * http://beholder.bitbucket.org/yandex.clusterer/
  *
     this.redraw();
   }, this);
 
-  this.repaint();
+  if (this.markers.length) this.repaint();
 }
 
 /**

yandex.clusterer.min.js

 /**
  * @name YandexClusterer for Yandex Maps.
- * @version 1.1.1 [March 02, 2012]
+ * @version 1.1.2 [May 03, 2012]
  * @author Alexander Shabunevich [http://aether.ru]
  * http://beholder.bitbucket.org/yandex.clusterer/
  *
  * Based on MarkerClustererPlus for Google Maps V3 by Gary Little
  */
-function YandexClusterer(map,markers,opts){this.map=map;this.bounds=null;this.clusters=[];this.markers=markers||[];this.zoom=null;this.map.YandexClusterer=this;this.yandexObjectManager=new YMaps.ObjectManager();this.map.addOverlay(this.yandexObjectManager);opts=opts||{};this.max_zoom=opts.max_zoom||0;this.grid=opts.grid||60;this.min_size=opts.min_size||2;this.centered=opts.centered||false;this.batch=opts.batch||400;this.imagePath_=opts.imagePath||YandexClusterer.IMAGE_PATH;this.imageExtension_=opts.imageExtension||YandexClusterer.IMAGE_EXTENSION;this.imageSizes_=opts.imageSizes||YandexClusterer.IMAGE_SIZES;this.styles=opts.styles||this.generateClusterStyles();this.printable=opts.printable||false;if(this.map._yandexClustererEvents){for(event in this.map._yandexClustererEvents){this.map._yandexClustererEvents[event].cleanup()}}this.map._yandexClustererEvents={};this.map._yandexClustererEvents['update']=YMaps.Events.observe(this.map,this.map.Events.Update,function(){this.repaint()},this);this.map._yandexClustererEvents['move']=YMaps.Events.observe(this.map,this.map.Events.MoveEnd,function(){this.redraw()},this);this.repaint()}YandexClusterer.prototype.setMarkers=function(markers){this.markers=markers};YandexClusterer.prototype.clearMarkers=function(){var l=this.markers.length;while(l--){var marker=this.markers[l];this.map.removeOverlay(marker);marker.isAdded=false;if(marker.isOnMap){marker.isOnMap=false}}this.yandexObjectManager.removeAll();l=this.clusters.length;while(l--){this.clusters[l].remove()}this.clusters=[]};YandexClusterer.prototype.repaint=function(){this.clearMarkers();this.redraw()};YandexClusterer.prototype.redraw=function(){this.createClusters(0)};YandexClusterer.prototype.createClusters=function(iter){var self=this;var i=iter;var length=this.markers.length;var iter_last=Math.min(iter+this.batch,length);if(iter===0){this.bounds=this.extendBounds(this.map.getBounds());this.zoom=this.map.getZoom();if(typeof this.timerRefStatic!=="undefined"){clearTimeout(this.timerRefStatic);delete this.timerRefStatic}}for(;i<iter_last;i++){var marker=this.markers[i];if(!marker.isAdded&&this.bounds.contains(marker.getCoordPoint())){this.addToCluster(marker)}}if(iter_last<length){this.timerRefStatic=setTimeout(function(){self.createClusters(iter_last)},0)}else{delete this.timerRefStatic;setTimeout(function(){self.updateClusterIcons()},0)}};YandexClusterer.prototype.extendBounds=function(bounds){var converter=this.map.converter,rtPix,lbPix,ne,sw;rtPix=converter.coordinatesToMapPixels(bounds.getRightTop());rtPix.x+=this.grid;rtPix.y-=this.grid;lbPix=converter.coordinatesToMapPixels(bounds.getLeftBottom());lbPix.x-=this.grid;lbPix.y+=this.grid;ne=converter.mapPixelsToCoordinates(rtPix);sw=converter.mapPixelsToCoordinates(lbPix);return new YMaps.GeoBounds(sw,ne)};YandexClusterer.prototype.addToCluster=function(marker){var d,cluster,center,l=this.clusters.length;var distance=40000;var clusterToAddTo=null;while(l--){cluster=this.clusters[l];if(cluster.center){d=this.distanceBetween(cluster.center,marker.getCoordPoint());if(d<distance){distance=d;clusterToAddTo=cluster}}}if(clusterToAddTo&&clusterToAddTo.isMarkerInBounds(marker)){clusterToAddTo.addMarker(marker)}else{cluster=new YandexCluster(this);cluster.addMarker(marker);this.clusters.push(cluster)}};YandexClusterer.prototype.distanceBetween=function(p1,p2){return p1.distance(p2)/1000};YandexClusterer.prototype.updateClusterIcons=function(){var self=this,l=this.clusters.length,max_zoom=this.getMaxZoom(),max_map_zoom=this.map.getZoom();while(l--){var cluster=this.clusters[l];count=cluster.markers.length;if(max_map_zoom>=max_zoom){var i=cluster.markers.length;while(i--){var marker=cluster.markers[i];if(!marker.isOnMap){this.yandexObjectManager.add(marker,this.zoom,this.zoom);marker.isOnMap=true}}continue}else if(count<this.min_size){var i=cluster.markers.length;while(i--){var marker=cluster.markers[i];if(!marker.isOnMap){this.yandexObjectManager.add(marker,this.zoom,this.zoom);marker.isOnMap=true}}continue}else{var i=cluster.markers.length;while(i--){var marker=cluster.markers[i];this.map.removeOverlay(marker);marker.isOnMap=false}}cluster.showIcon()}};YandexClusterer.prototype.getMaxZoom=function(){return this.max_zoom||this.map.getMaxZoom()};YandexClusterer.prototype.getClusterStyle=function(cluster){return this.styles[cluster.getIconStyleIndex(this.getStylesCount())]};YandexClusterer.prototype.generateClusterStyles=function(){var styles=[];for(var i=0;i<this.getStylesCount();i++){styles.push(this.genStyleForIndex(i))}return styles};YandexClusterer.prototype.genStyleForIndex=function(index){var size=this.imageSizes_[index];var iconPath=this.imagePath_+(index+1)+this.imageExtension_;var style={icon:iconPath,height:size,width:size,offset:[-parseInt(size/2,10),-parseInt(size/2,10)],textColor:'#000000',textSize:11};return style};YandexClusterer.prototype.getStylesCount=function(){return this.imageSizes_.length};YandexClusterer.IMAGE_PATH="http://google-maps-utility-library-v3.googlecode.com/svn/trunk/markerclustererplus/images/m";YandexClusterer.IMAGE_EXTENSION=".png";YandexClusterer.IMAGE_SIZES=[53,56,66,78,90];function YandexCluster(clusterOwner){this.clustererObject=clusterOwner;this.yandexObjectManager=clusterOwner.yandexObjectManager;this.map=clusterOwner.map;this.center=null;this.markers=[];this.markers_bounds=new YMaps.GeoCollectionBounds();this.bounds=null;this.min_size=clusterOwner.min_size;this.point=null}YandexCluster.prototype.addMarker=function(marker){var count,i,zoom=this.map.getZoom();if(marker.isAdded)return false;if(!this.center){this.center=marker.getCoordPoint();this.bounds=this.calculateBounds()}else if(this.clustererObject.centered){var l=this.markers.length+1,m_coord=marker.getCoordPoint();var lat=(this.center.getLat()*(l-1)+m_coord.getLat())/l;var lng=(this.center.getLng()*(l-1)+m_coord.getLng())/l;this.center=new YMaps.GeoPoint(lng,lat);this.bounds=this.calculateBounds()}marker.isAdded=true;this.markers.push(marker);this.markers_bounds.add(marker.getGeoPoint());return true};YandexCluster.prototype.getClusterBounds=function(){return this.markers_bounds};YandexCluster.prototype.calculateBounds=function(){var bounds=new YMaps.GeoCollectionBounds(this.center);return this.clustererObject.extendBounds(bounds)};YandexCluster.prototype.isMarkerInBounds=function(marker){return this.bounds.contains(marker.getCoordPoint())};YandexCluster.prototype.showIcon=function(){var self=this,position=new YMaps.GeoPoint(this.center.getLng(),this.center.getLat());if(this.point){this.yandexObjectManager.remove(this.point)}if(this.clustererObject.printable){var template=new YMaps.Template('<div style="cursor:pointer;position:relative;line-height:$[style.iconStyle.size.y]px;height:$[style.iconStyle.size.y]px;width:$[style.iconStyle.size.x]px;text-align:center"><img src="$[style.iconStyle.href]" alt="" style="position:absolute;left:0;top:0"><span style="position:relative;font-weight:bold;font-size:$[textSize|12]px;color:$[textColor|#000]">$[markersCount|0]</span></div>')}else{var template=new YMaps.Template('<div style="cursor:pointer;position:relative;line-height:$[style.iconStyle.size.y]px;height:$[style.iconStyle.size.y]px;width:$[style.iconStyle.size.x]px;text-align:center;background:url($[style.iconStyle.href]) no-repeat;font-weight:bold;font-size:$[textSize|12]px;color:$[textColor|#000]">$[markersCount|0]</div>')}var clusterStyle=this.clustererObject.getClusterStyle(this);var style=new YMaps.Style();style.iconStyle=new YMaps.IconStyle(template);style.iconStyle.href=clusterStyle.icon;style.iconStyle.size=new YMaps.Point(clusterStyle.width,clusterStyle.height);style.iconStyle.offset=new YMaps.Point(clusterStyle.offset[0],clusterStyle.offset[1]);this.point=new YMaps.Placemark(position,{style:style,hasBalloon:false});this.point.markersCount=this.markers.length;this.point.textSize=clusterStyle.textSize;this.point.textColor=clusterStyle.textColor;YMaps.Events.observe(this.point,this.point.Events.Click,function(){this.map.setBounds(this.getClusterBounds());if(this.clustererObject.getMaxZoom()<this.map.getZoom()){this.map.setZoom(this.clustererObject.getMaxZoom()+1)}},this);var zoom=this.map.getZoom();this.yandexObjectManager.add(this.point,zoom,zoom)};YandexCluster.prototype.remove=function(){this.markers=[];this.markers_bounds.clear();if(this.point){this.point=null}};YandexCluster.prototype.getIconStyleIndex=function(styles_num){var index=-1;var count=this.markers.length.toString();var dv=count;while(dv!==0){dv=parseInt(dv/10,10);index++}index=Math.min(index,styles_num-1);return index};
+function YandexClusterer(map,markers,opts){this.map=map;this.bounds=null;this.clusters=[];this.markers=markers||[];this.zoom=null;this.map.YandexClusterer=this;this.yandexObjectManager=new YMaps.ObjectManager();this.map.addOverlay(this.yandexObjectManager);opts=opts||{};this.max_zoom=opts.max_zoom||0;this.grid=opts.grid||60;this.min_size=opts.min_size||2;this.centered=opts.centered||false;this.batch=opts.batch||400;this.imagePath_=opts.imagePath||YandexClusterer.IMAGE_PATH;this.imageExtension_=opts.imageExtension||YandexClusterer.IMAGE_EXTENSION;this.imageSizes_=opts.imageSizes||YandexClusterer.IMAGE_SIZES;this.styles=opts.styles||this.generateClusterStyles();this.printable=opts.printable||false;if(this.map._yandexClustererEvents){for(event in this.map._yandexClustererEvents){this.map._yandexClustererEvents[event].cleanup()}}this.map._yandexClustererEvents={};this.map._yandexClustererEvents['update']=YMaps.Events.observe(this.map,this.map.Events.Update,function(){this.repaint()},this);this.map._yandexClustererEvents['move']=YMaps.Events.observe(this.map,this.map.Events.MoveEnd,function(){this.redraw()},this);if(this.markers.length)this.repaint()}YandexClusterer.prototype.setMarkers=function(markers){this.markers=markers};YandexClusterer.prototype.clearMarkers=function(){var l=this.markers.length;while(l--){var marker=this.markers[l];this.map.removeOverlay(marker);marker.isAdded=false;if(marker.isOnMap){marker.isOnMap=false}}this.yandexObjectManager.removeAll();l=this.clusters.length;while(l--){this.clusters[l].remove()}this.clusters=[]};YandexClusterer.prototype.repaint=function(){this.clearMarkers();this.redraw()};YandexClusterer.prototype.redraw=function(){this.createClusters(0)};YandexClusterer.prototype.createClusters=function(iter){var self=this;var i=iter;var length=this.markers.length;var iter_last=Math.min(iter+this.batch,length);if(iter===0){this.bounds=this.extendBounds(this.map.getBounds());this.zoom=this.map.getZoom();if(typeof this.timerRefStatic!=="undefined"){clearTimeout(this.timerRefStatic);delete this.timerRefStatic}}for(;i<iter_last;i++){var marker=this.markers[i];if(!marker.isAdded&&this.bounds.contains(marker.getCoordPoint())){this.addToCluster(marker)}}if(iter_last<length){this.timerRefStatic=setTimeout(function(){self.createClusters(iter_last)},0)}else{delete this.timerRefStatic;setTimeout(function(){self.updateClusterIcons()},0)}};YandexClusterer.prototype.extendBounds=function(bounds){var converter=this.map.converter,rtPix,lbPix,ne,sw;rtPix=converter.coordinatesToMapPixels(bounds.getRightTop());rtPix.x+=this.grid;rtPix.y-=this.grid;lbPix=converter.coordinatesToMapPixels(bounds.getLeftBottom());lbPix.x-=this.grid;lbPix.y+=this.grid;ne=converter.mapPixelsToCoordinates(rtPix);sw=converter.mapPixelsToCoordinates(lbPix);return new YMaps.GeoBounds(sw,ne)};YandexClusterer.prototype.addToCluster=function(marker){var d,cluster,center,l=this.clusters.length;var distance=40000;var clusterToAddTo=null;while(l--){cluster=this.clusters[l];if(cluster.center){d=this.distanceBetween(cluster.center,marker.getCoordPoint());if(d<distance){distance=d;clusterToAddTo=cluster}}}if(clusterToAddTo&&clusterToAddTo.isMarkerInBounds(marker)){clusterToAddTo.addMarker(marker)}else{cluster=new YandexCluster(this);cluster.addMarker(marker);this.clusters.push(cluster)}};YandexClusterer.prototype.distanceBetween=function(p1,p2){return p1.distance(p2)/1000};YandexClusterer.prototype.updateClusterIcons=function(){var self=this,l=this.clusters.length,max_zoom=this.getMaxZoom(),max_map_zoom=this.map.getZoom();while(l--){var cluster=this.clusters[l];count=cluster.markers.length;if(max_map_zoom>=max_zoom){var i=cluster.markers.length;while(i--){var marker=cluster.markers[i];if(!marker.isOnMap){this.yandexObjectManager.add(marker,this.zoom,this.zoom);marker.isOnMap=true}}continue}else if(count<this.min_size){var i=cluster.markers.length;while(i--){var marker=cluster.markers[i];if(!marker.isOnMap){this.yandexObjectManager.add(marker,this.zoom,this.zoom);marker.isOnMap=true}}continue}else{var i=cluster.markers.length;while(i--){var marker=cluster.markers[i];this.map.removeOverlay(marker);marker.isOnMap=false}}cluster.showIcon()}};YandexClusterer.prototype.getMaxZoom=function(){return this.max_zoom||this.map.getMaxZoom()};YandexClusterer.prototype.getClusterStyle=function(cluster){return this.styles[cluster.getIconStyleIndex(this.getStylesCount())]};YandexClusterer.prototype.generateClusterStyles=function(){var styles=[];for(var i=0;i<this.getStylesCount();i++){styles.push(this.genStyleForIndex(i))}return styles};YandexClusterer.prototype.genStyleForIndex=function(index){var size=this.imageSizes_[index];var iconPath=this.imagePath_+(index+1)+this.imageExtension_;var style={icon:iconPath,height:size,width:size,offset:[-parseInt(size/2,10),-parseInt(size/2,10)],textColor:'#000000',textSize:11};return style};YandexClusterer.prototype.getStylesCount=function(){return this.imageSizes_.length};YandexClusterer.IMAGE_PATH="http://google-maps-utility-library-v3.googlecode.com/svn/trunk/markerclustererplus/images/m";YandexClusterer.IMAGE_EXTENSION=".png";YandexClusterer.IMAGE_SIZES=[53,56,66,78,90];function YandexCluster(clusterOwner){this.clustererObject=clusterOwner;this.yandexObjectManager=clusterOwner.yandexObjectManager;this.map=clusterOwner.map;this.center=null;this.markers=[];this.markers_bounds=new YMaps.GeoCollectionBounds();this.bounds=null;this.min_size=clusterOwner.min_size;this.point=null}YandexCluster.prototype.addMarker=function(marker){var count,i,zoom=this.map.getZoom();if(marker.isAdded)return false;if(!this.center){this.center=marker.getCoordPoint();this.bounds=this.calculateBounds()}else if(this.clustererObject.centered){var l=this.markers.length+1,m_coord=marker.getCoordPoint();var lat=(this.center.getLat()*(l-1)+m_coord.getLat())/l;var lng=(this.center.getLng()*(l-1)+m_coord.getLng())/l;this.center=new YMaps.GeoPoint(lng,lat);this.bounds=this.calculateBounds()}marker.isAdded=true;this.markers.push(marker);this.markers_bounds.add(marker.getGeoPoint());return true};YandexCluster.prototype.getClusterBounds=function(){return this.markers_bounds};YandexCluster.prototype.calculateBounds=function(){var bounds=new YMaps.GeoCollectionBounds(this.center);return this.clustererObject.extendBounds(bounds)};YandexCluster.prototype.isMarkerInBounds=function(marker){return this.bounds.contains(marker.getCoordPoint())};YandexCluster.prototype.showIcon=function(){var self=this,position=new YMaps.GeoPoint(this.center.getLng(),this.center.getLat());if(this.point){this.yandexObjectManager.remove(this.point)}if(this.clustererObject.printable){var template=new YMaps.Template('<div style="cursor:pointer;position:relative;line-height:$[style.iconStyle.size.y]px;height:$[style.iconStyle.size.y]px;width:$[style.iconStyle.size.x]px;text-align:center"><img src="$[style.iconStyle.href]" alt="" style="position:absolute;left:0;top:0"><span style="position:relative;font-weight:bold;font-size:$[textSize|12]px;color:$[textColor|#000]">$[markersCount|0]</span></div>')}else{var template=new YMaps.Template('<div style="cursor:pointer;position:relative;line-height:$[style.iconStyle.size.y]px;height:$[style.iconStyle.size.y]px;width:$[style.iconStyle.size.x]px;text-align:center;background:url($[style.iconStyle.href]) no-repeat;font-weight:bold;font-size:$[textSize|12]px;color:$[textColor|#000]">$[markersCount|0]</div>')}var clusterStyle=this.clustererObject.getClusterStyle(this);var style=new YMaps.Style();style.iconStyle=new YMaps.IconStyle(template);style.iconStyle.href=clusterStyle.icon;style.iconStyle.size=new YMaps.Point(clusterStyle.width,clusterStyle.height);style.iconStyle.offset=new YMaps.Point(clusterStyle.offset[0],clusterStyle.offset[1]);this.point=new YMaps.Placemark(position,{style:style,hasBalloon:false});this.point.markersCount=this.markers.length;this.point.textSize=clusterStyle.textSize;this.point.textColor=clusterStyle.textColor;YMaps.Events.observe(this.point,this.point.Events.Click,function(){this.map.setBounds(this.getClusterBounds());if(this.clustererObject.getMaxZoom()<this.map.getZoom()){this.map.setZoom(this.clustererObject.getMaxZoom()+1)}},this);var zoom=this.map.getZoom();this.yandexObjectManager.add(this.point,zoom,zoom)};YandexCluster.prototype.remove=function(){this.markers=[];this.markers_bounds.clear();if(this.point){this.point=null}};YandexCluster.prototype.getIconStyleIndex=function(styles_num){var index=-1;var count=this.markers.length.toString();var dv=count;while(dv!==0){dv=parseInt(dv/10,10);index++}index=Math.min(index,styles_num-1);return index};

yandex.clusterer.packed.js

-eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('5 7(a,b,c){3.6=a;3.A=F;3.r=[];3.f=b||[];3.E=F;3.6.7=3;3.t=h g.2d();3.6.2t(3.t);c=c||{};3.M=c.M||0;3.G=c.G||2l;3.Q=c.Q||2;3.1e=c.1e||D;3.1a=c.1a||2h;3.1w=c.2E||7.1M;3.1U=c.2w||7.1E;3.1m=c.2M||7.1Q;3.1t=c.1t||3.1A();3.1i=c.1i||D;9(3.6.K){1u(1I 2p 3.6.K){3.6.K[1I].2I()}}3.6.K={};3.6.K[\'2Q\']=g.L.1q(3.6,3.6.L.2A,5(){3.1v()},3);3.6.K[\'2f\']=g.L.1q(3.6,3.6.L.2K,5(){3.18()},3);3.1v()}7.8.2u=5(a){3.f=a};7.8.1y=5(){4 l=3.f.k;v(l--){4 a=3.f[l];3.6.1O(a);a.W=D;9(a.C){a.C=D}}3.t.2n();l=3.r.k;v(l--){3.r[l].1g()}3.r=[]};7.8.1v=5(){3.1y();3.18()};7.8.18=5(){3.1s(0)};7.8.1s=5(a){4 b=3;4 i=a;4 c=3.f.k;4 d=1G.1W(a+3.1a,c);9(a===0){3.A=3.1o(3.6.2C());3.E=3.6.O();9(2S 3.T!=="2j"){2O(3.T);1C 3.T}}1u(;i<d;i++){4 e=3.f[i];9(!e.W&&3.A.20(e.S())){3.1S(e)}}9(d<c){3.T=24(5(){b.1s(d)},0)}I{1C 3.T;24(5(){b.22()},0)}};7.8.1o=5(a){4 b=3.6.2y,U,V,1c,1k;U=b.1K(a.2r());U.x+=3.G;U.y-=3.G;V=b.1K(a.2G());V.x-=3.G;V.y+=3.G;1c=b.1Y(U);1k=b.1Y(V);o h g.2U(1k,1c)};7.8.1S=5(a){4 d,w,j,l=3.r.k;4 b=2W;4 c=F;v(l--){w=3.r[l];9(w.j){d=3.1x(w.j,a.S());9(d<b){b=d;c=w}}}9(c&&c.1N(a)){c.17(a)}I{w=h s(3);w.17(a);3.r.1f(w)}};7.8.1x=5(a,b){o a.2e(b)/2m};7.8.22=5(){4 a=3,l=3.r.k,M=3.N(),1F=3.6.O();v(l--){4 b=3.r[l];1V=b.f.k;9(1F>=M){4 i=b.f.k;v(i--){4 c=b.f[i];9(!c.C){3.t.X(c,3.E,3.E);c.C=15}}1B}I 9(1V<3.Q){4 i=b.f.k;v(i--){4 c=b.f[i];9(!c.C){3.t.X(c,3.E,3.E);c.C=15}}1B}I{4 i=b.f.k;v(i--){4 c=b.f[i];3.6.1O(c);c.C=D}}b.1Z()}};7.8.N=5(){o 3.M||3.6.N()};7.8.26=5(a){o 3.1t[a.1R(3.1b())]};7.8.1A=5(){4 a=[];1u(4 i=0;i<3.1b();i++){a.1f(3.23(i))}o a};7.8.23=5(a){4 b=3.1m[a];4 c=3.1w+(a+1)+3.1U;4 d={1J:c,H:b,14:b,16:[-1j(b/2,10),-1j(b/2,10)],P:\'#2i\',R:11};o d};7.8.1b=5(){o 3.1m.k};7.1M="2B://2J-2R-2Y-32-36.3a.3d/2q/2F/2V/34/m";7.1E=".3f";7.1Q=[2x,30,3e,2N,38];5 s(a){3.B=a;3.t=a.t;3.6=a.6;3.j=F;3.f=[];3.Z=h g.1z();3.A=F;3.Q=a.Q;3.p=F}s.8.17=5(a){4 b,i,E=3.6.O();9(a.W)o D;9(!3.j){3.j=a.S();3.A=3.19()}I 9(3.B.1e){4 l=3.f.k+1,1l=a.S();4 c=(3.j.1p()*(l-1)+1l.1p())/l;4 d=(3.j.1r()*(l-1)+1l.1r())/l;3.j=h g.1P(d,c);3.A=3.19()}a.W=15;3.f.1f(a);3.Z.X(a.2g());o 15};s.8.2a=5(){o 3.Z};s.8.19=5(){4 a=h g.1z(3.j);o 3.B.1o(a)};s.8.1N=5(a){o 3.A.20(a.S())};s.8.1Z=5(){4 a=3,J=h g.1P(3.j.1r(),3.j.1p());9(3.p){3.t.1g(3.p)}9(3.B.1i){4 b=h g.25(\'<Y n="1H:2c;J:1h;28-H:$[n.q.u.y]z;H:$[n.q.u.y]z;14:$[n.q.u.x]z;1X-2b:j"><2o 2v="$[n.q.1n]" 2k="" n="J:2P;2X:0;2H:0"><1D n="J:1h;13-1T:27;13-u:$[R|12]z;21:$[P|#29]">$[1d|0]</1D></Y>\')}I{4 b=h g.25(\'<Y n="1H:2c;J:1h;28-H:$[n.q.u.y]z;H:$[n.q.u.y]z;14:$[n.q.u.x]z;1X-2b:j;2z:2s($[n.q.1n]) 2L-2Z;13-1T:27;13-u:$[R|12]z;21:$[P|#29]">$[1d|0]</Y>\')}4 c=3.B.26(3);4 d=h g.2D();d.q=h g.2T(b);d.q.1n=c.1J;d.q.u=h g.1L(c.14,c.H);d.q.16=h g.1L(c.16[0],c.16[1]);3.p=h g.31(J,{n:d,33:D});3.p.1d=3.f.k;3.p.R=c.R;3.p.P=c.P;g.L.1q(3.p,3.p.L.35,5(){3.6.37(3.2a());9(3.B.N()<3.6.O()){3.6.39(3.B.N()+1)}},3);4 e=3.6.O();3.t.X(3.p,e,e)};s.8.1g=5(){3.f=[];3.Z.3b();9(3.p){3.p=F}};s.8.1R=5(a){4 b=-1;4 c=3.f.k.3c();4 d=c;v(d!==0){d=1j(d/10,10);b++}b=1G.1W(b,a-1);o b};',62,202,'|||this|var|function|map|YandexClusterer|prototype|if||||||markers|YMaps|new||center|length|||style|return|point|iconStyle|clusters|YandexCluster|yandexObjectManager|size|while|cluster|||px|bounds|clustererObject|isOnMap|false|zoom|null|grid|height|else|position|_yandexClustererEvents|Events|max_zoom|getMaxZoom|getZoom|textColor|min_size|textSize|getCoordPoint|timerRefStatic|rtPix|lbPix|isAdded|add|div|markers_bounds||||font|width|true|offset|addMarker|redraw|calculateBounds|batch|getStylesCount|ne|markersCount|centered|push|remove|relative|printable|parseInt|sw|m_coord|imageSizes_|href|extendBounds|getLat|observe|getLng|createClusters|styles|for|repaint|imagePath_|distanceBetween|clearMarkers|GeoCollectionBounds|generateClusterStyles|continue|delete|span|IMAGE_EXTENSION|max_map_zoom|Math|cursor|event|icon|coordinatesToMapPixels|Point|IMAGE_PATH|isMarkerInBounds|removeOverlay|GeoPoint|IMAGE_SIZES|getIconStyleIndex|addToCluster|weight|imageExtension_|count|min|text|mapPixelsToCoordinates|showIcon|contains|color|updateClusterIcons|genStyleForIndex|setTimeout|Template|getClusterStyle|bold|line|000|getClusterBounds|align|pointer|ObjectManager|distance|move|getGeoPoint|400|000000|undefined|alt|60|1000|removeAll|img|in|svn|getRightTop|url|addOverlay|setMarkers|src|imageExtension|53|converter|background|Update|http|getBounds|Style|imagePath|trunk|getLeftBottom|top|cleanup|google|MoveEnd|no|imageSizes|78|clearTimeout|absolute|update|maps|typeof|IconStyle|GeoBounds|markerclustererplus|40000|left|utility|repeat|56|Placemark|library|hasBalloon|images|Click|v3|setBounds|90|setZoom|googlecode|clear|toString|com|66|png'.split('|'),0,{}))
+eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('7 9(6,8,n){3.6=6;3.p=C;3.t=[];3.8=8||[];3.s=C;3.6.9=3;3.u=h g.2s();3.6.2t(3.u);n=n||{};3.O=n.O||0;3.G=n.G||2u;3.P=n.P||2;3.1h=n.1h||D;3.1i=n.1i||2v;3.1G=n.2w||9.1H;3.1I=n.2x||9.1J;3.1j=n.2y||9.1K;3.H=n.H||3.1L();3.1k=n.1k||D;a(3.6.I){1l(1M 2z 3.6.I){3.6.I[1M].2A()}}3.6.I={};3.6.I[\'2B\']=g.J.1m(3.6,3.6.J.2C,7(){3.1n()},3);3.6.I[\'2D\']=g.J.1m(3.6,3.6.J.2E,7(){3.1o()},3);a(3.8.f)3.1n()}9.b.2F=7(8){3.8=8};9.b.1N=7(){4 l=3.8.f;w(l--){4 5=3.8[l];3.6.1O(5);5.15=D;a(5.E){5.E=D}}3.u.2G();l=3.t.f;w(l--){3.t[l].1p()}3.t=[]};9.b.1n=7(){3.1N();3.1o()};9.b.1o=7(){3.1q(0)};9.b.1q=7(16){4 Q=3;4 i=16;4 f=3.8.f;4 17=1P.1Q(16+3.1i,f);a(16===0){3.p=3.1r(3.6.2H());3.s=3.6.R();a(2I 3.S!=="2J"){2K(3.S);1R 3.S}}1l(;i<17;i++){4 5=3.8[i];a(!5.15&&3.p.1S(5.T())){3.1T(5)}}a(17<f){3.S=1U(7(){Q.1q(17)},0)}K{1R 3.S;1U(7(){Q.1V()},0)}};9.b.1r=7(p){4 L=3.6.L,U,V,1s,1t;U=L.1W(p.2L());U.x+=3.G;U.y-=3.G;V=L.1W(p.2M());V.x-=3.G;V.y+=3.G;1s=L.1X(U);1t=L.1X(V);o h g.2N(1t,1s)};9.b.1T=7(5){4 d,e,j,l=3.t.f;4 18=2O;4 W=C;w(l--){e=3.t[l];a(e.j){d=3.1Y(e.j,5.T());a(d<18){18=d;W=e}}}a(W&&W.1Z(5)){W.1u(5)}K{e=h v(3);e.1u(5);3.t.1v(e)}};9.b.1Y=7(20,21){o 20.18(21)/2P};9.b.1V=7(){4 Q=3,l=3.t.f,O=3.X(),22=3.6.R();w(l--){4 e=3.t[l];Y=e.8.f;a(22>=O){4 i=e.8.f;w(i--){4 5=e.8[i];a(!5.E){3.u.19(5,3.s,3.s);5.E=1a}}23}K a(Y<3.P){4 i=e.8.f;w(i--){4 5=e.8[i];a(!5.E){3.u.19(5,3.s,3.s);5.E=1a}}23}K{4 i=e.8.f;w(i--){4 5=e.8[i];3.6.1O(5);5.E=D}}e.24()}};9.b.X=7(){o 3.O||3.6.X()};9.b.25=7(e){o 3.H[e.26(3.1w())]};9.b.1L=7(){4 H=[];1l(4 i=0;i<3.1w();i++){H.1v(3.27(i))}o H};9.b.27=7(z){4 k=3.1j[z];4 28=3.1G+(z+1)+3.1I;4 c={29:28,M:k,1b:k,1c:[-1x(k/2,10),-1x(k/2,10)],Z:\'#2Q\',13:11};o c};9.b.1w=7(){o 3.1j.f};9.1H="2R://2S-2T-2U-2V-2W.2X.2Y/2Z/30/31/32/m";9.1J=".33";9.1K=[34,35,36,37,38];7 v(14){3.F=14;3.u=14.u;3.6=14.6;3.j=C;3.8=[];3.1d=h g.2a();3.p=C;3.P=14.P;3.q=C}v.b.1u=7(5){4 Y,i,s=3.6.R();a(5.15)o D;a(!3.j){3.j=5.T();3.p=3.1y()}K a(3.F.1h){4 l=3.8.f+1,1z=5.T();4 2b=(3.j.1A()*(l-1)+1z.1A())/l;4 2c=(3.j.1B()*(l-1)+1z.1B())/l;3.j=h g.2d(2c,2b);3.p=3.1y()}5.15=1a;3.8.1v(5);3.1d.19(5.39());o 1a};v.b.2e=7(){o 3.1d};v.b.1y=7(){4 p=h g.2a(3.j);o 3.F.1r(p)};v.b.1Z=7(5){o 3.p.1S(5.T())};v.b.24=7(){4 Q=3,N=h g.2d(3.j.1B(),3.j.1A());a(3.q){3.u.1p(3.q)}a(3.F.1k){4 1C=h g.2f(\'<1e c="2g:2h;N:1D;2i-M:$[c.r.k.y]A;M:$[c.r.k.y]A;1b:$[c.r.k.x]A;2j-2k:j"><3a 3b="$[c.r.1E]" 3c="" c="N:3d;3e:0;3f:0"><2l c="N:1D;1f-2m:2n;1f-k:$[13|12]A;2o:$[Z|#2p]">$[1F|0]</2l></1e>\')}K{4 1C=h g.2f(\'<1e c="2g:2h;N:1D;2i-M:$[c.r.k.y]A;M:$[c.r.k.y]A;1b:$[c.r.k.x]A;2j-2k:j;3g:3h($[c.r.1E]) 3i-3j;1f-2m:2n;1f-k:$[13|12]A;2o:$[Z|#2p]">$[1F|0]</1e>\')}4 B=3.F.25(3);4 c=h g.3k();c.r=h g.3l(1C);c.r.1E=B.29;c.r.k=h g.2q(B.1b,B.M);c.r.1c=h g.2q(B.1c[0],B.1c[1]);3.q=h g.3m(N,{c:c,3n:D});3.q.1F=3.8.f;3.q.13=B.13;3.q.Z=B.Z;g.J.1m(3.q,3.q.J.3o,7(){3.6.3p(3.2e());a(3.F.X()<3.6.R()){3.6.3q(3.F.X()+1)}},3);4 s=3.6.R();3.u.19(3.q,s,s)};v.b.1p=7(){3.8=[];3.1d.3r();a(3.q){3.q=C}};v.b.26=7(2r){4 z=-1;4 Y=3.8.f.3s();4 1g=Y;w(1g!==0){1g=1x(1g/10,10);z++}z=1P.1Q(z,2r-1);o z};',62,215,'|||this|var|marker|map|function|markers|YandexClusterer|if|prototype|style||cluster|length|YMaps|new||center|size|||opts|return|bounds|point|iconStyle|zoom|clusters|yandexObjectManager|YandexCluster|while|||index|px|clusterStyle|null|false|isOnMap|clustererObject|grid|styles|_yandexClustererEvents|Events|else|converter|height|position|max_zoom|min_size|self|getZoom|timerRefStatic|getCoordPoint|rtPix|lbPix|clusterToAddTo|getMaxZoom|count|textColor||||textSize|clusterOwner|isAdded|iter|iter_last|distance|add|true|width|offset|markers_bounds|div|font|dv|centered|batch|imageSizes_|printable|for|observe|repaint|redraw|remove|createClusters|extendBounds|ne|sw|addMarker|push|getStylesCount|parseInt|calculateBounds|m_coord|getLat|getLng|template|relative|href|markersCount|imagePath_|IMAGE_PATH|imageExtension_|IMAGE_EXTENSION|IMAGE_SIZES|generateClusterStyles|event|clearMarkers|removeOverlay|Math|min|delete|contains|addToCluster|setTimeout|updateClusterIcons|coordinatesToMapPixels|mapPixelsToCoordinates|distanceBetween|isMarkerInBounds|p1|p2|max_map_zoom|continue|showIcon|getClusterStyle|getIconStyleIndex|genStyleForIndex|iconPath|icon|GeoCollectionBounds|lat|lng|GeoPoint|getClusterBounds|Template|cursor|pointer|line|text|align|span|weight|bold|color|000|Point|styles_num|ObjectManager|addOverlay|60|400|imagePath|imageExtension|imageSizes|in|cleanup|update|Update|move|MoveEnd|setMarkers|removeAll|getBounds|typeof|undefined|clearTimeout|getRightTop|getLeftBottom|GeoBounds|40000|1000|000000|http|google|maps|utility|library|v3|googlecode|com|svn|trunk|markerclustererplus|images|png|53|56|66|78|90|getGeoPoint|img|src|alt|absolute|left|top|background|url|no|repeat|Style|IconStyle|Placemark|hasBalloon|Click|setBounds|setZoom|clear|toString'.split('|'),0,{}))