@progress/kendo-ui
Version:
This package is part of the [Kendo UI for jQuery](http://www.telerik.com/kendo-ui) suite.
1 lines • 3.02 kB
JavaScript
module.exports=function(t){function n(o){if(r[o])return r[o].exports;var i=r[o]={exports:{},id:o,loaded:!1};return t[o].call(i.exports,i,i.exports,n),i.loaded=!0,i.exports}var r={};return n.m=t,n.c=r,n.p="",n(0)}({0:function(t,n,r){t.exports=r(887)},3:function(t,n){t.exports=function(){throw Error("define cannot be used indirect")}},859:function(t,n){t.exports=require("../../kendo.drawing")},887:function(t,n,r){var o,i,e;!function(a,define){i=[r(888),r(859)],o=a,e="function"==typeof o?o.apply(n,i):o,!(void 0!==e&&(t.exports=e))}(function(){!function(t,n){var r=Math,o=r.atan,i=r.exp,e=r.pow,a=r.sin,s=r.log,u=r.tan,c=window.kendo,d=c.Class,f=c.dataviz,p=c.deepExtend,_=c.geometry,l=_.Point,h=f.map,m=h.Location,v=c.drawing.util,E=v.rad,x=v.deg,w=v.limitValue,A=r.PI,L=A/2,M=A/4,N=A/180,j={a:6378137,b:6356752.314245179,f:.0033528106647474805,e:.08181919084262149},G=d.extend({init:function(t){this._initOptions(t)},MAX_LNG:180,MAX_LAT:85.0840590501,INVERSE_ITERATIONS:15,INVERSE_CONVERGENCE:1e-12,options:{centralMeridian:0,datum:j},forward:function(t,n){var r=this,o=r.options,i=o.datum,e=i.a,a=o.centralMeridian,s=w(t.lat,-r.MAX_LAT,r.MAX_LAT),u=n?w(t.lng,-r.MAX_LNG,r.MAX_LNG):t.lng,c=E(u-a)*e,d=r._projectLat(s);return new l(c,d)},_projectLat:function(t){var n=this.options.datum,r=n.e,o=n.a,i=E(t),c=u(M+i/2),d=r*a(i),f=e((1-d)/(1+d),r/2);return o*s(c*f)},inverse:function(t,n){var r=this,o=r.options,i=o.datum,e=i.a,a=o.centralMeridian,s=t.x/(N*e)+a,u=w(r._inverseY(t.y),-r.MAX_LAT,r.MAX_LAT);return n&&(s=w(s,-r.MAX_LNG,r.MAX_LNG)),new m(u,s)},_inverseY:function(t){var n,s,u,c,d=this,f=d.options.datum,p=f.a,_=f.e,l=_/2,h=i(-t/p),m=L-2*o(h);for(n=0;n<=d.INVERSE_ITERATIONS&&(s=_*a(m),u=e((1-s)/(1+s),l),c=L-2*o(h*u)-m,m+=c,!(r.abs(c)<=d.INVERSE_CONVERGENCE));n++);return x(m)}}),S=G.extend({MAX_LAT:85.0511287798,_projectLat:function(t){var n=this.options.datum.a,r=E(t),o=u(M+r/2);return n*s(o)},_inverseY:function(t){var n=this.options.datum.a,r=i(-t/n);return x(L-2*o(r))}}),X=d.extend({forward:function(t){return new l(t.lng,t.lat)},inverse:function(t){return new m(t.y,t.x)}}),T=d.extend({init:function(){var t=this,n=t._proj=new S,r=this.c=2*A*n.options.datum.a;this._tm=_.transform().translate(.5,.5).scale(1/r,-1/r),this._itm=_.transform().scale(r,-r).translate(-.5,-.5)},toPoint:function(t,n,r){var o=this._proj.forward(t,r);return o.transform(this._tm).scale(n||1)},toLocation:function(t,n,r){return t=t.clone().scale(1/(n||1)).transform(this._itm),this._proj.inverse(t,r)}}),g=d.extend({init:function(){this._proj=new G},toPoint:function(t){return this._proj.forward(t)},toLocation:function(t){return this._proj.inverse(t)}}),I=d.extend({init:function(){this._proj=new X},toPoint:function(t){return this._proj.forward(t)},toLocation:function(t){return this._proj.inverse(t)}});p(f,{map:{crs:{EPSG3395:g,EPSG3857:T,EPSG4326:I},datums:{WGS84:j},projections:{Equirectangular:X,Mercator:G,SphericalMercator:S}}})}(window.kendo.jQuery)},r(3))},888:function(t,n){t.exports=require("./location")}});