0d0186beb8c5485483315b33a75c56295cb82bcf.svn-base
4.18 KB
google.maps.__gjsload__('geometry', 'function vi(a,b){return ld(Bd(b-a,-180,180))}function wi(a,b,c,d){if(!d)return vi(a.lng(),c)/vi(a.lng(),b.lng())*(b.lat()-a.lat())+a.lat();var d=M(a.lat()),a=M(a.lng()),e=M(b.lat()),b=M(b.lng()),c=M(c);return Bd(Dd(o[xb](o.sin(d)*o.cos(e)*o.sin(c-b)-o.sin(e)*o.cos(d)*o.sin(c-a),o.cos(d)*o.cos(e)*o.sin(a-b))),-90,90)}\nvar xi={containsLocation:function(a,b){for(var c=Bd(a.lng(),-180,180),d=!!b.get("geodesic"),e=b.get("latLngs"),f=k,g=0,h=e[$b]();g<h;++g)for(var m=e[bc](g),p=0,r=m[$b]();p<r;++p){var v=m[bc](p),z=m[bc]((p+1)%r),C=Bd(v.lng(),-180,180),J=Bd(z.lng(),-180,180),V=od(C,J),C=pd(C,J);if(180<V-C?c>=V||c<C:c<V&&c>=C)wi(v,z,c,d)<a.lat()&&(f=!f)}return f||xi.isLocationOnEdge(a,b)},isLocationOnEdge:function(a,b,c){for(var c=c||1.0E-9,d=Bd(a.lng(),-180,180),e=b instanceof Gh,f=!!b.get("geodesic"),b=b.get("latLngs"),\ng=0,h=b[$b]();g<h;++g)for(var m=b[bc](g),p=m[$b](),r=e?p:p-1,v=0;v<r;++v){var z=m[bc](v),C=m[bc]((v+1)%p),J=Bd(z.lng(),-180,180),V=Bd(C.lng(),-180,180),ha=od(J,V),xa=pd(J,V),ya;if(ya=1.0E-9>=ld(Bd(J-V,-180,180))){if(J=ld(Bd(J-d,-180,180))<=c||ld(Bd(V-d,-180,180))<=c)J=a.lat(),V=pd(z.lat(),C.lat())-c,ya=od(z.lat(),C.lat())+c,J=J>=V&&J<=ya;ya=J}if(ya)return i;if(180<ha-xa?d+c>=ha||d-c<=xa:d+c>=xa&&d-c<=ha)if(z=wi(z,C,d,f),ld(z-a.lat())<c)return i}return k}};var yi={computeHeading:function(a,b){var c=M(a.Xa),d=M(b.Xa),e=M(b.Ya)-M(a.Ya);return Bd(Dd(o[xb](o.sin(e)*o.cos(d),o.cos(c)*o.sin(d)-o.sin(c)*o.cos(d)*o.cos(e))),-180,180)},computeOffset:function(a,b,c,d){var b=b/(d||6378137),c=M(c),e=M(a.Xa),d=o.cos(b),b=o.sin(b),f=o.sin(e),e=o.cos(e),g=d*f+b*e*o.cos(c);return new Q(Dd(o[zc](g)),Dd(M(a.Ya)+o[xb](b*e*o.sin(c),d-f*g)))},interpolate:function(a,b,c){var d=M(a.Xa),e=M(a.Ya),f=M(b.Xa),g=M(b.Ya),h=o.cos(d),m=o.cos(f),b=yi.Xe(a,b),p=o.sin(b);if(1.0E-6>\np)return new Q(a.lat(),a.lng());a=o.sin((1-c)*b)/p;c=o.sin(c*b)/p;b=a*h*o.cos(e)+c*m*o.cos(g);e=a*h*o.sin(e)+c*m*o.sin(g);return new Q(Dd(o[xb](a*o.sin(d)+c*o.sin(f),o[Bb](b*b+e*e))),Dd(o[xb](e,b)))},Xe:function(a,b){var c=M(a.Xa),d=M(b.Xa);return 2*o[zc](o[Bb](o.pow(o.sin((c-d)/2),2)+o.cos(c)*o.cos(d)*o.pow(o.sin((M(a.Ya)-M(b.Ya))/2),2)))},computeDistanceBetween:function(a,b,c){return yi.Xe(a,b)*(c||6378137)},computeLength:function(a,b){var c=b||6378137,d=0;a instanceof Mf&&(a=a[oc]());for(var e=\n0,f=a[B]-1;e<f;++e)d+=yi.computeDistanceBetween(a[e],a[e+1],c);return d},computeArea:function(a,b){return o.abs(yi.computeSignedArea(a,b))},computeSignedArea:function(a,b){var c=b||6378137;a instanceof Mf&&(a=a[oc]());for(var d=a[0],e=0,f=1,g=a[B]-1;f<g;++f)e+=yi.al(d,a[f],a[f+1]);return e*c*c},al:function(a,b,c){return yi.Sk(a,b,c)*yi.Tk(a,b,c)},Sk:function(a,b,c){for(var d=[a,b,c,a],a=[],c=b=0;3>c;++c)a[c]=yi.Xe(d[c],d[c+1]),b+=a[c];b/=2;d=o.tan(b/2);for(c=0;3>c;++c)d*=o.tan((b-a[c])/2);return 4*\no[kc](o[Bb](o.abs(d)))},Tk:function(a,b,c){a=[a,b,c];b=[];for(c=0;3>c;++c){var d=a[c],e=M(d.Xa),d=M(d.Ya),f=b[c]=[];f[0]=o.cos(e)*o.cos(d);f[1]=o.cos(e)*o.sin(d);f[2]=o.sin(e)}return 0<b[0][0]*b[1][1]*b[2][2]+b[1][0]*b[2][1]*b[0][2]+b[2][0]*b[0][1]*b[1][2]-b[0][0]*b[2][1]*b[1][2]-b[1][0]*b[0][1]*b[2][2]-b[2][0]*b[1][1]*b[0][2]?1:-1}};var zi={decodePath:function(a){for(var b=K(a),c=fa(o[fb](a[B]/2)),d=0,e=0,f=0,g=0;d<b;++g){var h=1,m=0,p;do p=a[nc](d++)-63-1,h+=p<<m,m+=5;while(31<=p);e+=h&1?~(h>>1):h>>1;h=1;m=0;do p=a[nc](d++)-63-1,h+=p<<m,m+=5;while(31<=p);f+=h&1?~(h>>1):h>>1;c[g]=new Q(1.0E-5*e,1.0E-5*f,i)}La(c,g);return c},encodePath:function(a){a instanceof Mf&&(a=a[oc]());return zi.dl(a,function(a){return[qd(1E5*a.lat()),qd(1E5*a.lng())]})},dl:function(a,b){for(var c=[],d=[0,0],e,f=0,g=K(a);f<g;++f)e=b?b(a[f]):a[f],zi.fh(e[0]-\nd[0],c),zi.fh(e[1]-d[1],c),d=e;return c[Dc]("")},Cl:function(a){for(var b=K(a),c=fa(b),d=0;d<b;++d)c[d]=a[nc](d)-63;return c},fh:function(a,b){return zi.fl(0>a?~(a<<1):a<<1,b)},fl:function(a,b){for(;32<=a;)b[q](ka[rb]((32|a&31)+63)),a>>=5;b[q](ka[rb](a+63));return b}};ff[ue]=function(a){eval(a)};Wc.google.maps[ue]={encoding:zi,spherical:yi,poly:xi};function Ai(){}I=Ai[D];I.decodePath=zi.decodePath;I.encodePath=zi.encodePath;I.computeDistanceBetween=yi.computeDistanceBetween;I.interpolate=yi.interpolate;I.computeHeading=yi.computeHeading;I.computeOffset=yi.computeOffset;jf(ue,new Ai);\n')