!function(t,e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){for(var n=0;n=s[a]){o=h[a];break}return{lng:(e=this.convertor(t,o)).lng.toFixed(6),lat:e.lat.toFixed(6)}}},{key:"convertLL2MC",value:function(t){if(!t)return{lng:0,lat:0};if(t.lng>180||t.lng<-180||t.lat>90||t.lat<-90)return t;if(this.isWgs84){var e={},n=6378137;e.lng=t.lng*Math.PI/180*n;var r=t.lat*Math.PI/180;return e.lat=3189068.5*Math.log((1+Math.sin(r))/(1-Math.sin(r))),{lng:parseFloat(e.lng.toFixed(2)),lat:parseFloat(e.lat.toFixed(2))}}t.lng=this.getLoop(t.lng,-180,180),t.lat=this.getRange(t.lat,-74,74);t.lng;for(var o=t.lat,a=void 0,i=0;i=f[i]){a=y[i];break}if(!a)for(var c=0;cn;)t-=n-e;for(;t73.66&&t<135.05&&e>3.86&&e<53.55)}}]),t}();function x(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=u(t);if(e){var o=u(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return l(this,n)}}var b=function(t){i(a,t);var r=x(a);function a(t){var o;n(this,a),o=r.call(this,t);var i=new g;return o._projection.project=function(t,n){return n=n||{},n=M.WGS84ToGCJ02(e.Math.toDegrees(t.longitude),e.Math.toDegrees(t.latitude)),(n=M.GCJ02ToBD09(n[0],n[1]))[0]=Math.min(n[0],180),n[0]=Math.max(n[0],-180),n[1]=Math.min(n[1],74.000022),n[1]=Math.max(n[1],-71.988531),n=i.lngLatToPoint({lng:n[0],lat:n[1]}),new e.Cartesian2(n.x,n.y)},o._projection.unproject=function(t,n){return n=n||{},n=i.mercatorToLngLat({lng:t.x,lat:t.y}),n=M.BD09ToGCJ02(n.lng,n.lat),n=M.GCJ02ToWGS84(n[0],n[1]),new e.Cartographic(e.Math.toRadians(n[0]),e.Math.toRadians(n[1]))},o.resolutions=t.resolutions||[],o}return o(a,[{key:"tileXYToNativeRectangle",value:function(t,n,r,o){var a=this.resolutions[r],i=t*a,c=(t+1)*a,l=(1+(n=-n))*a,u=n*a;return e.defined(o)?(o.west=i,o.south=u,o.east=c,o.north=l,o):new e.Rectangle(i,u,c,l)}},{key:"positionToTileXY",value:function(t,n,r){var o=this._rectangle;if(e.Rectangle.contains(o,t)){var a=this._projection.project(t);if(e.defined(a)){var i=this.resolutions[n],c=Math.floor(a.x/i),l=-Math.floor(a.y/i);return e.defined(r)?(r.x=c,r.y=l,r):new e.Cartesian2(c,l)}}}}]),a}(e.WebMercatorTilingScheme);function R(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=u(t);if(e){var o=u(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return l(this,n)}}var w={img:"//shangetu{s}.map.bdimg.com/it/u=x={x};y={y};z={z};v=009;type=sate&fm=46",vec:"//online{s}.map.bdimg.com/tile/?qt=tile&x={x}&y={y}&z={z}&styles=sl&v=020",custom:"//api{s}.map.bdimg.com/customimage/tile?&x={x}&y={y}&z={z}&scale=1&customid={style}",traffic:"//its.map.baidu.com:8002/traffic/TrafficTileService?time={time}&label={labelStyle}&v=016&level={z}&x={x}&y={y}&scaler=2"},T=function(t){i(a,t);var r=R(a);function a(){var t,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(n(this,a),o.url=o.url||[o.protocol||"",w[o.style]||w.custom].join(""),"WGS84"===o.crs){for(var i=[],c=0;c<19;c++)i[c]=256*Math.pow(2,18-c);o.tilingScheme=new b({resolutions:i,rectangleSouthwestInMeters:new e.Cartesian2(-20037726.37,-12474104.17),rectangleNortheastInMeters:new e.Cartesian2(20037726.37,12474104.17)})}else o.tilingScheme=new e.WebMercatorTilingScheme({rectangleSouthwestInMeters:new e.Cartesian2(-33554054,-33746824),rectangleNortheastInMeters:new e.Cartesian2(33554054,33746824)});return o.maximumLevel=18,(t=r.call(this,o))._rectangle=t._tilingScheme.rectangle,t._url=o.url,t._crs=o.crs||"BD09",t._style=o.style||"normal",t}return o(a,[{key:"requestImage",value:function(t,n,r){var o=this._tilingScheme.getNumberOfXTilesAtLevel(r),a=this._tilingScheme.getNumberOfYTilesAtLevel(r),i=this._url.replace("{z}",r).replace("{s}",String(1)).replace("{style}",this._style);return i="WGS84"===this._crs?i.replace("{x}",String(t)).replace("{y}",String(-n)):i.replace("{x}",String(t-o/2)).replace("{y}",String(a/2-n-1)),e.ImageryProvider.loadImage(this,i)}}]),a}(e.UrlTemplateImageryProvider);function L(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=u(t);if(e){var o=u(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return l(this,n)}}var P=function(t){i(a,t);var r=L(a);function a(t){var o;n(this,a),o=r.call(this,t);var i=new e.WebMercatorProjection;return o._projection.project=function(t,n){return n=M.WGS84ToGCJ02(e.Math.toDegrees(t.longitude),e.Math.toDegrees(t.latitude)),n=i.project(new e.Cartographic(e.Math.toRadians(n[0]),e.Math.toRadians(n[1]))),new e.Cartesian2(n.x,n.y)},o._projection.unproject=function(t,n){var r=i.unproject(t);return n=M.GCJ02ToWGS84(e.Math.toDegrees(r.longitude),e.Math.toDegrees(r.latitude)),new e.Cartographic(e.Math.toRadians(n[0]),e.Math.toRadians(n[1]))},o}return o(a)}(e.WebMercatorTilingScheme);function k(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=u(t);if(e){var o=u(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return l(this,n)}}var S={img:"//webst{s}.is.autonavi.com/appmaptile?style=6&x={x}&y={y}&z={z}",elec:"//webrd{s}.is.autonavi.com/appmaptile?lang=zh_cn&size=1&scale=1&style=8&x={x}&y={y}&z={z}",cva:"//webst{s}.is.autonavi.com/appmaptile?lang=zh_cn&size=1&scale=1&style=8&x={x}&y={y}&z={z}"},_=function(t){i(r,t);var e=k(r);function r(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n(this,r),t.url=t.url||[t.protocol||"",S[t.style]||S.elec].join(""),t.subdomains&&t.subdomains.length||(t.subdomains=["01","02","03","04"]),"WGS84"===t.crs&&(t.tilingScheme=new P),e.call(this,t)}return o(r)}(e.UrlTemplateImageryProvider);function z(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=u(t);if(e){var o=u(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return l(this,n)}}var j={img:"//p{s}.map.gtimg.com/sateTiles/{z}/{sx}/{sy}/{x}_{reverseY}.jpg?version=400",elec:"//rt{s}.map.gtimg.com/tile?z={z}&x={x}&y={reverseY}&styleid={style}&scene=0&version=347"},C=function(t){i(r,t);var e=z(r);function r(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};n(this,r);var o=t.url||[t.protocol||"",j[t.style]||j.elec].join("");return t.url=o.replace("{style}",t.style||"1"),t.subdomains&&t.subdomains.length||(t.subdomains=["0","1","2"]),"img"===t.style&&(t.customTags={sx:function(t,e,n,r){return e>>4},sy:function(t,e,n,r){return(1<>4}}),e.call(this,t)}return o(r)}(e.UrlTemplateImageryProvider);function I(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=u(t);if(e){var o=u(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return l(this,n)}}var B=function(t){i(r,t);var e=I(r);function r(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n(this,r),e.call(this,{url:[t.protocol||"","//t{s}.tianditu.gov.cn/DataServer?T={style}_w&x={x}&y={y}&l={z}&tk={key}".replace(/\{style\}/g,t.style||"vec").replace(/\{key\}/g,t.key||"")].join(""),subdomains:["0","1","2","3","4","5","6","7"],maximumLevel:18})}return o(r)}(e.UrlTemplateImageryProvider);function O(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=u(t);if(e){var o=u(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return l(this,n)}}var G={img:"https://gac-geo.googlecnapps.cn/maps/vt?lyrs=s&x={x}&y={y}&z={z}",elec:"https://gac-geo.googlecnapps.cn/maps/vt?lyrs=m&x={x}&y={y}&z={z}",cva:"https://gac-geo.googlecnapps.cn/maps/vt?lyrs=h&x={x}&y={y}&z={z}",ter:"https://gac-geo.googlecnapps.cn/maps/vt?lyrs=t@131,r&x={x}&y={y}&z={z}",img_cva:"https://gac-geo.googlecnapps.cn/maps/vt?lyrs=y&x={x}&y={y}&z={z}"},D=function(t){i(r,t);var e=O(r);function r(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n(this,r),t.url=t.url||[t.protocol||"",G[t.style]||G.elec].join(""),"WGS84"===t.crs&&(t.tilingScheme=new P),e.call(this,t)}return o(r)}(e.UrlTemplateImageryProvider);function W(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=u(t);if(e){var o=u(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return l(this,n)}}var F=function(t){i(r,t);var e=W(r);function r(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n(this,r),t.url=t.url||[t.protocol||"","//tiles{s}.geovisearth.com/base/v1/{style}/{z}/{x}/{y}?format={format}&tmsIds=w&token={key}".replace(/\{style\}/g,t.style||"vec").replace(/\{format\}/g,t.format||"png").replace(/\{key\}/g,t.key||"")].join(""),t.subdomains=t.subdomains||["1","2","3"],e.call(this,t)}return o(r)}(e.UrlTemplateImageryProvider);t.AmapImageryProvider=_,t.BaiduImageryProvider=T,t.GeoVisImageryProvider=F,t.GoogleImageryProvider=D,t.TdtImageryProvider=B,t.TencentImageryProvider=C}(this.window=this.window||{},Cesium);