@dvgis/cesium-map
Advanced tools
Comparing version 2.2.2 to 2.3.0
@@ -1,1 +0,1 @@ | ||
!function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=7)}([function(e,t){function r(t){return e.exports=r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},r(t)}e.exports=r},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t,r){var n=r(8);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&n(e,t)}},function(e,t,r){var n=r(9),i=r(10);e.exports=function(e,t){return!t||"object"!==n(t)&&"function"!=typeof t?i(e):t}},function(e,t,r){var n=r(11),i=r(12),o=r(13),u=r(14);e.exports=function(e){return n(e)||i(e)||o(e)||u()}},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}},function(e,t){function r(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}e.exports=function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}},function(e,t,r){e.exports=r(15)},function(e,t){function r(t,n){return e.exports=r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},r(t,n)}e.exports=r},function(e,t){function r(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=r=function(e){return typeof e}:e.exports=r=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(t)}e.exports=r},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},function(e,t,r){var n=r(5);e.exports=function(e){if(Array.isArray(e))return n(e)}},function(e,t){e.exports=function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}},function(e,t,r){var n=r(5);e.exports=function(e,t){if(e){if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(e,t,r){"use strict";r.r(t);var n=r(1),i=r.n(n),o=r(6),u=r.n(o),s="http://shangetu{s}.map.bdimg.com/it/u=x={x};y={y};z={z};v=009;type=sate&fm=46",c="http://online{s}.map.bdimg.com/tile/?qt=tile&x={x}&y={y}&z={z}&styles=sl&v=020",l="http://api{s}.map.bdimg.com/customimage/tile?&x={x}&y={y}&z={z}&scale=1&customid={style}",a=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i()(this,e),this._url="img"===t.style?s:"vec"===t.style?c:l,this._tileWidth=256,this._tileHeight=256,this._maximumLevel=18,this._tilingScheme=new Cesium.WebMercatorTilingScheme({rectangleSouthwestInMeters:new Cesium.Cartesian2(-33554054,-33746824),rectangleNortheastInMeters:new Cesium.Cartesian2(33554054,33746824)}),this._rectangle=this._tilingScheme.rectangle,this._credit=void 0,this._style=t.style||"normal"}return u()(e,[{key:"getTileCredits",value:function(e,t,r){}},{key:"requestImage",value:function(e,t,r){if(!this.ready)throw new Cesium.DeveloperError("requestImage must not be called before the imagery provider is ready.");var n=this._tilingScheme.getNumberOfXTilesAtLevel(r),i=this._tilingScheme.getNumberOfYTilesAtLevel(r),o=this._url.replace("{x}",e-n/2).replace("{y}",i/2-t-1).replace("{z}",r).replace("{s}",1).replace("{style}",this._style);return Cesium.ImageryProvider.loadImage(this,o)}},{key:"url",get:function(){return this._url}},{key:"token",get:function(){return this._token}},{key:"tileWidth",get:function(){if(!this.ready)throw new Cesium.DeveloperError("tileWidth must not be called before the imagery provider is ready.");return this._tileWidth}},{key:"tileHeight",get:function(){if(!this.ready)throw new Cesium.DeveloperError("tileHeight must not be called before the imagery provider is ready.");return this._tileHeight}},{key:"maximumLevel",get:function(){if(!this.ready)throw new Cesium.DeveloperError("maximumLevel must not be called before the imagery provider is ready.");return this._maximumLevel}},{key:"minimumLevel",get:function(){if(!this.ready)throw new Cesium.DeveloperError("minimumLevel must not be called before the imagery provider is ready.");return 0}},{key:"tilingScheme",get:function(){if(!this.ready)throw new Cesium.DeveloperError("tilingScheme must not be called before the imagery provider is ready.");return this._tilingScheme}},{key:"rectangle",get:function(){if(!this.ready)throw new Cesium.DeveloperError("rectangle must not be called before the imagery provider is ready.");return this._rectangle}},{key:"ready",get:function(){return!!this._url}},{key:"credit",get:function(){return this._credit}},{key:"hasAlphaChannel",get:function(){return!0}}]),e}(),f=r(2),y=r.n(f),m=r(3),p=r.n(m),h=r(0),g=r.n(h);function d(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=g()(e);if(t){var i=g()(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return p()(this,r)}}var v="http://webrd{s}.is.autonavi.com/appmaptile?lang=zh_cn&size=1&scale=1&style=8&x={x}&y={y}&z={z}",b=function(e){y()(r,e);var t=d(r);function r(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return i()(this,r),e.url="img"===e.style?"https://webst{s}.is.autonavi.com/appmaptile?style=6&x={x}&y={y}&z={z}":v,e.subdomains&&e.subdomains.length||(e.subdomains=["01","02","03","04"]),t.call(this,e)}return r}(Cesium.UrlTemplateImageryProvider);function x(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=g()(e);if(t){var i=g()(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return p()(this,r)}}var _=function(e){y()(r,e);var t=x(r);function r(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i()(this,r);var n="img"===e.style?"https://p{s}.map.gtimg.com/sateTiles/{z}/{sx}/{sy}/{x}_{reverseY}.jpg?version=400":"https://rt{s}.map.gtimg.com/tile?z={z}&x={x}&y={reverseY}&styleid={style}&scene=0&version=347";return e.url=n.replace("{style}",e.style||1),e.subdomains&&e.subdomains.length||(e.subdomains=["0","1","2"]),"img"===e.style&&(e.customTags={sx:function(e,t,r,n){return t>>4},sy:function(e,t,r,n){return(1<<n)-r>>4}}),t.call(this,e)}return r}(Cesium.UrlTemplateImageryProvider),S=r(4),w=r.n(S);function C(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=g()(e);if(t){var i=g()(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return p()(this,r)}}var z="http://t{s}.tianditu.gov.cn/{layer}_c/wmts?service=WMTS&version=1.0.0&request=GetTile&tilematrix={TileMatrix}&layer={layer}&style={style}&tilerow={TileRow}&tilecol={TileCol}&tilematrixset={TileMatrixSet}&format=tiles&tk={key}",P=function(e){y()(r,e);var t=C(r);function r(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return i()(this,r),t.call(this,{url:z.replace(/\{layer\}/g,e.style||"vec").replace(/\{key\}/g,e.key||""),style:"default",format:"tiles",tileMatrixSetID:"c",subdomains:w()(Array(6).keys()).map((function(e){return(e+1).toString()})),tileMatrixLabels:w()(Array(18).keys()).map((function(e){return(e+1).toString()})),tilingScheme:new Cesium.GeographicTilingScheme,maximumLevel:18})}return r}(Cesium.WebMapTileServiceImageryProvider);function T(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=g()(e);if(t){var i=g()(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return p()(this,r)}}var k="http://mt{s}.google.cn/vt/lyrs=m@207000000&hl=zh-CN&gl=CN&src=app&x={x}&y={y}&z={z}&s=Galile",O="http://mt{s}.google.cn/vt/lyrs=t@131,r@227000000&hl=zh-CN&gl=cn&x={x}&y={y}&z={z}&s=Galile",R=function(e){y()(r,e);var t=T(r);function r(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return i()(this,r),e.url="img"===e.style?"http://mt{s}.google.cn/vt/lyrs=s&hl=zh-CN&x={x}&y={y}&z={z}&s=Gali":"ter"===e.style?O:k,e.subdomains&&e.subdomains.length||(e.subdomains=["1","2","3"]),t.call(this,e)}return r}(Cesium.UrlTemplateImageryProvider);Cesium.AmapImageryProvider=b,Cesium.BaiduImageryProvider=a,Cesium.TencentImageryProvider=_,Cesium.TdtImageryProvider=P,Cesium.GoogleImageryProvider=R}]); | ||
!function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=5)}([function(e,t){function r(t){return e.exports=r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},r(t)}e.exports=r},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t,r){var n=r(6);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&n(e,t)}},function(e,t,r){var n=r(7),i=r(8);e.exports=function(e,t){return!t||"object"!==n(t)&&"function"!=typeof t?i(e):t}},function(e,t){function r(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}e.exports=function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}},function(e,t,r){e.exports=r(9)},function(e,t){function r(t,n){return e.exports=r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},r(t,n)}e.exports=r},function(e,t){function r(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=r=function(e){return typeof e}:e.exports=r=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(t)}e.exports=r},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},function(e,t,r){"use strict";r.r(t);var n=r(1),i=r.n(n),o=r(4),u=r.n(o),s="http://shangetu{s}.map.bdimg.com/it/u=x={x};y={y};z={z};v=009;type=sate&fm=46",c="http://online{s}.map.bdimg.com/tile/?qt=tile&x={x}&y={y}&z={z}&styles=sl&v=020",l="http://api{s}.map.bdimg.com/customimage/tile?&x={x}&y={y}&z={z}&scale=1&customid={style}",a=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i()(this,e),this._url="img"===t.style?s:"vec"===t.style?c:l,this._tileWidth=256,this._tileHeight=256,this._maximumLevel=18,this._tilingScheme=new Cesium.WebMercatorTilingScheme({rectangleSouthwestInMeters:new Cesium.Cartesian2(-33554054,-33746824),rectangleNortheastInMeters:new Cesium.Cartesian2(33554054,33746824)}),this._rectangle=this._tilingScheme.rectangle,this._credit=void 0,this._style=t.style||"normal"}return u()(e,[{key:"getTileCredits",value:function(e,t,r){}},{key:"requestImage",value:function(e,t,r){if(!this.ready)throw new Cesium.DeveloperError("requestImage must not be called before the imagery provider is ready.");var n=this._tilingScheme.getNumberOfXTilesAtLevel(r),i=this._tilingScheme.getNumberOfYTilesAtLevel(r),o=this._url.replace("{x}",e-n/2).replace("{y}",i/2-t-1).replace("{z}",r).replace("{s}",1).replace("{style}",this._style);return Cesium.ImageryProvider.loadImage(this,o)}},{key:"url",get:function(){return this._url}},{key:"token",get:function(){return this._token}},{key:"tileWidth",get:function(){if(!this.ready)throw new Cesium.DeveloperError("tileWidth must not be called before the imagery provider is ready.");return this._tileWidth}},{key:"tileHeight",get:function(){if(!this.ready)throw new Cesium.DeveloperError("tileHeight must not be called before the imagery provider is ready.");return this._tileHeight}},{key:"maximumLevel",get:function(){if(!this.ready)throw new Cesium.DeveloperError("maximumLevel must not be called before the imagery provider is ready.");return this._maximumLevel}},{key:"minimumLevel",get:function(){if(!this.ready)throw new Cesium.DeveloperError("minimumLevel must not be called before the imagery provider is ready.");return 0}},{key:"tilingScheme",get:function(){if(!this.ready)throw new Cesium.DeveloperError("tilingScheme must not be called before the imagery provider is ready.");return this._tilingScheme}},{key:"rectangle",get:function(){if(!this.ready)throw new Cesium.DeveloperError("rectangle must not be called before the imagery provider is ready.");return this._rectangle}},{key:"ready",get:function(){return!!this._url}},{key:"credit",get:function(){return this._credit}},{key:"hasAlphaChannel",get:function(){return!0}}]),e}(),f=r(2),y=r.n(f),m=r(3),p=r.n(m),h=r(0),g=r.n(h);function d(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=g()(e);if(t){var i=g()(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return p()(this,r)}}var v="http://webrd{s}.is.autonavi.com/appmaptile?lang=zh_cn&size=1&scale=1&style=8&x={x}&y={y}&z={z}",b=function(e){y()(r,e);var t=d(r);function r(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return i()(this,r),e.url="img"===e.style?"https://webst{s}.is.autonavi.com/appmaptile?style=6&x={x}&y={y}&z={z}":v,e.subdomains&&e.subdomains.length||(e.subdomains=["01","02","03","04"]),t.call(this,e)}return r}(Cesium.UrlTemplateImageryProvider);function x(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=g()(e);if(t){var i=g()(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return p()(this,r)}}var _=function(e){y()(r,e);var t=x(r);function r(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i()(this,r);var n="img"===e.style?"https://p{s}.map.gtimg.com/sateTiles/{z}/{sx}/{sy}/{x}_{reverseY}.jpg?version=400":"https://rt{s}.map.gtimg.com/tile?z={z}&x={x}&y={reverseY}&styleid={style}&scene=0&version=347";return e.url=n.replace("{style}",e.style||1),e.subdomains&&e.subdomains.length||(e.subdomains=["0","1","2"]),"img"===e.style&&(e.customTags={sx:function(e,t,r,n){return t>>4},sy:function(e,t,r,n){return(1<<n)-r>>4}}),t.call(this,e)}return r}(Cesium.UrlTemplateImageryProvider);function w(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=g()(e);if(t){var i=g()(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return p()(this,r)}}var C="https://t{s}.tianditu.gov.cn/DataServer?T={style}_w&x={x}&y={y}&l={z}&tk={key}",S=function(e){y()(r,e);var t=w(r);function r(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return i()(this,r),t.call(this,{url:C.replace(/\{style\}/g,e.style||"vec").replace(/\{key\}/g,e.key||""),subdomains:["0","1","2","3","4","5","6","7"],tilingScheme:new Cesium.WebMercatorTilingScheme,maximumLevel:18})}return r}(Cesium.UrlTemplateImageryProvider);function z(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=g()(e);if(t){var i=g()(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return p()(this,r)}}var P="http://mt{s}.google.cn/vt/lyrs=m@207000000&hl=zh-CN&gl=CN&src=app&x={x}&y={y}&z={z}&s=Galile",R="http://mt{s}.google.cn/vt/lyrs=t@131,r@227000000&hl=zh-CN&gl=cn&x={x}&y={y}&z={z}&s=Galile",k=function(e){y()(r,e);var t=z(r);function r(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return i()(this,r),e.url="img"===e.style?"http://mt{s}.google.cn/vt/lyrs=s&hl=zh-CN&x={x}&y={y}&z={z}&s=Gali":"ter"===e.style?R:P,e.subdomains&&e.subdomains.length||(e.subdomains=["1","2","3"]),t.call(this,e)}return r}(Cesium.UrlTemplateImageryProvider);Cesium.AmapImageryProvider=b,Cesium.BaiduImageryProvider=a,Cesium.TencentImageryProvider=_,Cesium.TdtImageryProvider=S,Cesium.GoogleImageryProvider=k}]); |
{ | ||
"name": "@dvgis/cesium-map", | ||
"version": "2.2.2", | ||
"version": "2.3.0", | ||
"main": "src/index.js", | ||
@@ -5,0 +5,0 @@ "repository": "https://github.com/dvgis/cesium-map.git", |
@@ -5,3 +5,3 @@ # cesium-map | ||
<img src="https://img.shields.io/badge/license-Apache%202-blue"/> | ||
<img src="https://img.shields.io/github/package-json/v/Digital-Visual/cesium-map?color=orange&logo=github" /> | ||
<img src="https://img.shields.io/npm/v/@dvgis/cesium-map?color=orange&logo=github" /> | ||
<img src="https://img.shields.io/npm/dw/@dvgis/cesium-map?logo=npm"/> | ||
@@ -18,3 +18,3 @@ </p> | ||
> CDN | ||
`CDN` | ||
@@ -25,7 +25,7 @@ ```html | ||
> NPM / YARN | ||
`NPM / YARN` | ||
```shell | ||
npm install @dvgis/cesium-map | ||
yarn add @dvgis/cesium-map | ||
npm install @dvgis/cesium-map | ||
yarn add @dvgis/cesium-map | ||
``` | ||
@@ -74,3 +74,3 @@ | ||
var options = { | ||
style: 'vec', | ||
style: 'vec', //style: img、vec、vca、ter | ||
key: '' | ||
@@ -104,4 +104,5 @@ } | ||
``` | ||
## 示例 | ||
> http://dc.dvgis.cn |
@@ -7,19 +7,13 @@ /** | ||
const MAP_URL = | ||
'http://t{s}.tianditu.gov.cn/{layer}_c/wmts?service=WMTS&version=1.0.0&request=GetTile&tilematrix={TileMatrix}&layer={layer}&style={style}&tilerow={TileRow}&tilecol={TileCol}&tilematrixset={TileMatrixSet}&format=tiles&tk={key}' | ||
'https://t{s}.tianditu.gov.cn/DataServer?T={style}_w&x={x}&y={y}&l={z}&tk={key}' | ||
class TdtImageryProvider extends Cesium.WebMapTileServiceImageryProvider { | ||
class TdtImageryProvider extends Cesium.UrlTemplateImageryProvider { | ||
constructor(options = {}) { | ||
super({ | ||
url: MAP_URL.replace(/\{layer\}/g, options.style || 'vec').replace( | ||
url: MAP_URL.replace(/\{style\}/g, options.style || 'vec').replace( | ||
/\{key\}/g, | ||
options.key || '' | ||
), | ||
style: 'default', | ||
format: 'tiles', | ||
tileMatrixSetID: 'c', | ||
subdomains: [...Array(6).keys()].map(item => (item + 1).toString()), | ||
tileMatrixLabels: [...Array(18).keys()].map(item => | ||
(item + 1).toString() | ||
), | ||
tilingScheme: new Cesium.GeographicTilingScheme(), | ||
subdomains: ['0', '1', '2', '3', '4', '5', '6', '7'], | ||
tilingScheme: new Cesium.WebMercatorTilingScheme(), | ||
maximumLevel: 18 | ||
@@ -26,0 +20,0 @@ }) |
@@ -1,7 +0,6 @@ | ||
/* | ||
/** | ||
* @Author: Caven | ||
* @Date: 2019-06-13 10:56:27 | ||
* @Last Modified by: Caven | ||
* @Last Modified time: 2020-05-08 21:22:13 | ||
* @Date: 2021-01-16 12:14:05 | ||
*/ | ||
import BaiduImageryProvider from './imagery/baidu/BaiduImageryProvider' | ||
@@ -8,0 +7,0 @@ import AmapImageryProvider from './imagery/amap/AmapImageryProvider' |
104
33560
267