Subversion Repositories eFlore/Applications.cel

Rev

Rev 424 | Blame | Last modification | View Log | RSS feed

(function(){var d=true,e=null,g=false;function i(a){return function(b){this[a]=b}}function j(a){return function(){return this[a]}}var k;
function l(a,b,c){this.extend(l,google.maps.OverlayView);this.b=a;this.a=[];this.m=[];this.$=[53,56,66,78,90];this.i=[];this.A=g;c=c||{};this.f=c.gridSize||60;this.V=c.maxZoom||e;this.i=c.styles||[];this.U=c.imagePath||this.O;this.T=c.imageExtension||this.N;this.M=d;if(c.zoomOnClick!=undefined)this.M=c.zoomOnClick;this.p=g;if(c.averageCenter!=undefined)this.p=c.averageCenter;m(this);this.setMap(a);this.I=this.b.getZoom();var f=this;google.maps.event.addListener(this.b,"zoom_changed",function(){var h=
f.b.mapTypes[f.b.getMapTypeId()].maxZoom,o=f.b.getZoom();if(!(o<0||o>h))if(f.I!=o){f.I=f.b.getZoom();f.k()}});google.maps.event.addListener(this.b,"idle",function(){f.h()});b&&b.length&&this.C(b,g)}k=l.prototype;k.O="http://google-maps-utility-library-v3.googlecode.com/svn/trunk/markerclusterer/images/m";k.N="png";k.extend=function(a,b){return function(c){for(var f in c.prototype)this.prototype[f]=c.prototype[f];return this}.apply(a,[b])};k.onAdd=function(){if(!this.A){this.A=d;p(this)}};k.draw=function(){};
function m(a){if(!a.i.length)for(var b=0,c;c=a.$[b];b++)a.i.push({url:a.U+(b+1)+"."+a.T,height:c,width:c})}k.z=j("i");k.w=j("a");k.S=function(){return this.a.length};k.H=function(){return this.V||this.b.mapTypes[this.b.getMapTypeId()].maxZoom};k.F=function(a,b){for(var c=0,f=a.length,h=f;h!==0;){h=parseInt(h/10,10);c++}c=Math.min(c,b);return{text:f,index:c}};k.Y=i("F");k.G=j("F");k.C=function(a,b){for(var c=0,f;f=a[c];c++)q(this,f);b||this.h()};
function q(a,b){b.setVisible(g);b.setMap(e);b.r=g;b.draggable&&google.maps.event.addListener(b,"dragend",function(){b.r=g;a.k();a.h()});a.a.push(b)}k.o=function(a,b){q(this,a);b||this.h()};function r(a,b){var c=-1;if(a.a.indexOf)c=a.a.indexOf(b);else for(var f=0,h;h=a.a[f];f++)if(h==b){c=f;break}if(c==-1)return g;a.a.splice(c,1);b.setVisible(g);b.setMap(e);return d}k.W=function(a,b){var c=r(this,a);if(!b&&c){this.k();this.h();return d}else return g};
k.X=function(a,b){for(var c=g,f=0,h;h=a[f];f++){h=r(this,h);c=c||h}if(!b&&c){this.k();this.h();return d}};k.R=function(){return this.m.length};k.getMap=j("b");k.setMap=i("b");k.v=j("f");k.Z=i("f");
k.u=function(a){var b=this.getProjection(),c=new google.maps.LatLng(a.getNorthEast().lat(),a.getNorthEast().lng()),f=new google.maps.LatLng(a.getSouthWest().lat(),a.getSouthWest().lng());c=b.fromLatLngToDivPixel(c);c.x+=this.f;c.y-=this.f;f=b.fromLatLngToDivPixel(f);f.x-=this.f;f.y+=this.f;c=b.fromDivPixelToLatLng(c);b=b.fromDivPixelToLatLng(f);a.extend(c);a.extend(b);return a};k.P=function(){this.k();this.a=[]};
k.k=function(){for(var a=0,b;b=this.m[a];a++)b.remove();for(a=0;b=this.a[a];a++){b.r=g;b.setMap(e);b.setVisible(g)}this.m=[]};k.h=function(){p(this)};function p(a){if(a.A)for(var b=a.u(new google.maps.LatLngBounds(a.b.getBounds().getSouthWest(),a.b.getBounds().getNorthEast())),c=0,f;f=a.a[c];c++){var h=g;if(!f.r&&b.contains(f.getPosition())){for(var o=0,n;n=a.m[o];o++)if(!h&&n.getCenter()&&n.t.contains(f.getPosition())){h=d;n.o(f);break}if(!h){n=new s(a);n.o(f);a.m.push(n)}}}}
function s(a){this.j=a;this.b=a.getMap();this.f=a.v();this.p=a.p;this.d=e;this.a=[];this.t=e;this.l=new t(this,a.z(),a.v())}k=s.prototype;
k.o=function(a){var b;a:if(this.a.indexOf)b=this.a.indexOf(a)!=-1;else{b=0;for(var c;c=this.a[b];b++)if(c==a){b=d;break a}b=g}if(b)return g;if(this.d){if(this.p){c=this.a.length+1;b=(this.d.lat()-a.getPosition().lat())/c;c=(this.d.lng()-a.getPosition().lng())/c;b=this.d.lat()+b;c=this.d.lng()+c;this.d=new google.maps.LatLng(b,c);u(this)}}else{this.d=a.getPosition();u(this)}if(this.a.length==0){a.setMap(this.b);a.setVisible(d)}else if(this.a.length==1){this.a[0].setMap(e);this.a[0].setVisible(g)}a.r=
d;this.a.push(a);if(this.b.getZoom()>this.j.H())for(a=0;b=this.a[a];a++){b.setMap(this.b);b.setVisible(d)}else if(this.a.length<2)v(this.l);else{b=this.j.G()(this.a,this.j.z().length);this.l.setCenter(this.d);a=this.l;a.B=b;a.ca=b.text;a.aa=b.index;if(a.c)a.c.innerHTML=b.text;b=Math.max(0,a.B.index-1);b=Math.min(a.i.length-1,b);b=a.i[b];a.L=b.url;a.g=b.height;a.n=b.width;a.J=b.textColor;a.e=b.anchor;a.K=b.textSize;a.D=b.backgroundPosition;this.l.show()}return d};k.getBounds=function(){u(this);return this.t};
k.remove=function(){this.l.remove();this.a.length=0;delete this.a};k.Q=function(){return this.a.length};k.w=j("a");k.getCenter=j("d");function u(a){a.t=a.j.u(new google.maps.LatLngBounds(a.d,a.d))}k.getMap=j("b");function t(a,b,c){a.j.extend(t,google.maps.OverlayView);this.i=b;this.ba=c||0;this.q=a;this.d=e;this.b=a.getMap();this.B=this.c=e;this.s=g;this.setMap(this.b)}k=t.prototype;
k.onAdd=function(){this.c=document.createElement("DIV");if(this.s){this.c.style.cssText=w(this,x(this,this.d));this.c.innerHTML=this.B.text}this.getPanes().overlayImage.appendChild(this.c);var a=this;google.maps.event.addDomListener(this.c,"click",function(){var b=a.q.j;google.maps.event.trigger(b,"clusterclick",a.q);if(b.M){a.b.panTo(a.q.getCenter());a.b.fitBounds(a.q.getBounds())}})};
function x(a,b){var c=a.getProjection().fromLatLngToDivPixel(b);c.x-=parseInt(a.n/2,10);c.y-=parseInt(a.g/2,10);return c}k.draw=function(){if(this.s){var a=x(this,this.d);this.c.style.top=a.y+"px";this.c.style.left=a.x+"px"}};function v(a){if(a.c)a.c.style.display="none";a.s=g}k.show=function(){if(this.c){this.c.style.cssText=w(this,x(this,this.d));this.c.style.display=""}this.s=d};k.remove=function(){this.setMap(e)};
k.onRemove=function(){if(this.c&&this.c.parentNode){v(this);this.c.parentNode.removeChild(this.c);this.c=e}};k.setCenter=i("d");
function w(a,b){var c=[];if(document.all)c.push('filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=scale,src="'+a.L+'");');else{c.push("background-image:url("+a.L+");");c.push("background-position:"+(a.D?a.D:"0 0")+";")}if(typeof a.e==="object"){typeof a.e[0]==="number"&&a.e[0]>0&&a.e[0]<a.g?c.push("height:"+(a.g-a.e[0])+"px; padding-top:"+a.e[0]+"px;"):c.push("height:"+a.g+"px; line-height:"+a.g+"px;");typeof a.e[1]==="number"&&a.e[1]>0&&a.e[1]<a.n?c.push("width:"+(a.n-a.e[1])+
"px; padding-left:"+a.e[1]+"px;"):c.push("width:"+a.n+"px; text-align:center;")}else c.push("height:"+a.g+"px; line-height:"+a.g+"px; width:"+a.n+"px; text-align:center;");c.push("cursor:pointer; top:"+b.y+"px; left:"+b.x+"px; color:"+(a.J?a.J:"black")+"; position:absolute; font-size:"+(a.K?a.K:11)+"px; font-family:Arial,sans-serif; font-weight:bold");return c.join("")}window.MarkerClusterer=l;l.prototype.addMarker=l.prototype.o;l.prototype.addMarkers=l.prototype.C;l.prototype.clearMarkers=l.prototype.P;
l.prototype.getCalculator=l.prototype.G;l.prototype.getGridSize=l.prototype.v;l.prototype.getExtendedBounds=l.prototype.u;l.prototype.getMap=l.prototype.getMap;l.prototype.getMarkers=l.prototype.w;l.prototype.getMaxZoom=l.prototype.H;l.prototype.getStyles=l.prototype.z;l.prototype.getTotalClusters=l.prototype.R;l.prototype.getTotalMarkers=l.prototype.S;l.prototype.redraw=l.prototype.h;l.prototype.removeMarker=l.prototype.W;l.prototype.removeMarkers=l.prototype.X;l.prototype.resetViewport=l.prototype.k;
l.prototype.setCalculator=l.prototype.Y;l.prototype.setGridSize=l.prototype.Z;l.prototype.onAdd=l.prototype.onAdd;l.prototype.draw=l.prototype.draw;s.prototype.getCenter=s.prototype.getCenter;s.prototype.getSize=s.prototype.Q;s.prototype.getMarkers=s.prototype.w;t.prototype.onAdd=t.prototype.onAdd;t.prototype.draw=t.prototype.draw;t.prototype.onRemove=t.prototype.onRemove;
})();