cesium-pocket 0.5.7-alpha → 0.5.8-alpha

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,52 +1,52 @@
1
- import { UrlTemplateImageryProvider as c, WebMercatorTilingScheme as _, WebMapTileServiceImageryProvider as m, Credit as o, Ion as T, IonImageryProvider as l } from "cesium";
2
- const y = new c({
1
+ import { UrlTemplateImageryProvider as o, WebMercatorTilingScheme as n, WebMapTileServiceImageryProvider as s, Credit as l, Ion as T, IonImageryProvider as r } from "cesium";
2
+ const c = new o({
3
3
  url: "https://webst0{s}.is.autonavi.com/appmaptile?style=6&x={x}&y={y}&z={z}",
4
4
  subdomains: ["1", "2", "3", "4"],
5
- tilingScheme: new _(),
5
+ tilingScheme: new n(),
6
6
  minimumLevel: 3,
7
7
  maximumLevel: 18,
8
8
  credit: "高德地图"
9
- }), M = new c({
9
+ }), y = new o({
10
10
  url: "https://webst0{s}.is.autonavi.com/appmaptile?style=8&x={x}&y={y}&z={z}",
11
11
  subdomains: ["1", "2", "3", "4"],
12
- tilingScheme: new _(),
12
+ tilingScheme: new n(),
13
13
  minimumLevel: 3,
14
14
  maximumLevel: 18,
15
15
  credit: "高德地图"
16
- }), d = new c({
16
+ }), _ = new o({
17
17
  url: "https://wprd0{s}.is.autonavi.com/appmaptile?lang=zh_cn&size=1&scl=2&style=7&x={x}&y={y}&z={z}",
18
18
  subdomains: ["1", "2", "3", "4"],
19
- tilingScheme: new _(),
19
+ tilingScheme: new n(),
20
20
  minimumLevel: 3,
21
21
  maximumLevel: 18,
22
22
  credit: "高德地图"
23
- }), w = new c({
23
+ }), w = new o({
24
24
  url: "https://wprd0{s}.is.autonavi.com/appmaptile?lang=zh_cn&size=1&scl=1&style=7&x={x}&y={y}&z={z}",
25
25
  subdomains: ["1", "2", "3", "4"],
26
- tilingScheme: new _(),
26
+ tilingScheme: new n(),
27
27
  minimumLevel: 3,
28
28
  maximumLevel: 18,
29
29
  credit: "高德地图"
30
- }), n = "41a84209559237faa6064094bf9dbfcb", g = new m({
31
- url: "http://{s}.tianditu.gov.cn/img_w/wmts?service=wmts&request=GetTile&version=1.0.0&LAYER=img&tileMatrixSet=w&TileMatrix={TileMatrix}&TileRow={TileRow}&TileCol={TileCol}&style=default&format=tiles&tk=" + n,
30
+ }), m = "41a84209559237faa6064094bf9dbfcb", M = new s({
31
+ url: "http://{s}.tianditu.gov.cn/img_w/wmts?service=wmts&request=GetTile&version=1.0.0&LAYER=img&tileMatrixSet=w&TileMatrix={TileMatrix}&TileRow={TileRow}&TileCol={TileCol}&style=default&format=tiles&tk=" + m,
32
32
  layer: "img",
33
33
  style: "default",
34
34
  format: "image/jpeg",
35
35
  tileMatrixSetID: "w",
36
36
  subdomains: ["t0", "t1", "t2", "t3", "t4", "t5", "t6", "t7"],
37
- credit: new o("天地图影像"),
37
+ credit: new l("天地图影像"),
38
38
  maximumLevel: 18
39
- }), v = new m({
40
- url: "http://{s}.tianditu.gov.cn/cia_w/wmts?service=wmts&request=GetTile&version=1.0.0&LAYER=cia&tileMatrixSet=w&TileMatrix={TileMatrix}&TileRow={TileRow}&TileCol={TileCol}&style=default&format=tiles&tk=" + n,
39
+ }), d = new s({
40
+ url: "http://{s}.tianditu.gov.cn/cia_w/wmts?service=wmts&request=GetTile&version=1.0.0&LAYER=cia&tileMatrixSet=w&TileMatrix={TileMatrix}&TileRow={TileRow}&TileCol={TileCol}&style=default&format=tiles&tk=" + m,
41
41
  layer: "cia",
42
42
  style: "default",
43
43
  format: "image/jpeg",
44
44
  tileMatrixSetID: "w",
45
45
  subdomains: ["t0", "t1", "t2", "t3", "t4", "t5", "t6", "t7"],
46
- credit: new o("天地图影像注记"),
46
+ credit: new l("天地图影像注记"),
47
47
  maximumLevel: 18
48
- }), u = new m({
49
- url: "http://{s}.tianditu.gov.cn/vec_w/wmts?service=wmts&request=GetTile&version=1.0.0&LAYER=vec&tileMatrixSet=w&TileMatrix={TileMatrix}&TileRow={TileRow}&TileCol={TileCol}&style=default&format=tiles&tk=" + n,
48
+ }), u = new s({
49
+ url: "http://{s}.tianditu.gov.cn/vec_w/wmts?service=wmts&request=GetTile&version=1.0.0&LAYER=vec&tileMatrixSet=w&TileMatrix={TileMatrix}&TileRow={TileRow}&TileCol={TileCol}&style=default&format=tiles&tk=" + m,
50
50
  layer: "vec",
51
51
  //wmts请求的层名称
52
52
  style: "default",
@@ -54,10 +54,10 @@ const y = new c({
54
54
  tileMatrixSetID: "w",
55
55
  //用于WMTS请求的TileMatrixSet的标识符。
56
56
  subdomains: ["t0", "t1", "t2", "t3", "t4", "t5", "t6", "t7"],
57
- credit: new o("天地图矢量"),
57
+ credit: new l("天地图矢量"),
58
58
  maximumLevel: 18
59
- }), I = new m({
60
- url: "http://{s}.tianditu.gov.cn/cva_w/wmts?service=wmts&request=GetTile&version=1.0.0&LAYER=cva&tileMatrixSet=w&TileMatrix={TileMatrix}&TileRow={TileRow}&TileCol={TileCol}&style=default&format=tiles&tk=" + n,
59
+ }), v = new s({
60
+ url: "http://{s}.tianditu.gov.cn/cva_w/wmts?service=wmts&request=GetTile&version=1.0.0&LAYER=cva&tileMatrixSet=w&TileMatrix={TileMatrix}&TileRow={TileRow}&TileCol={TileCol}&style=default&format=tiles&tk=" + m,
61
61
  layer: "vec",
62
62
  //wmts请求的层名称
63
63
  style: "default",
@@ -65,27 +65,27 @@ const y = new c({
65
65
  tileMatrixSetID: "w",
66
66
  //用于WMTS请求的TileMatrixSet的标识符。
67
67
  subdomains: ["t0", "t1", "t2", "t3", "t4", "t5", "t6", "t7"],
68
- credit: new o("天地图矢量注记"),
68
+ credit: new l("天地图矢量注记"),
69
69
  maximumLevel: 18
70
- }), h = new m({
71
- url: "http://{s}.tianditu.gov.cn/ter_w/wmts?service=wmts&request=GetTile&version=1.0.0&LAYER=ter&tileMatrixSet=w&TileMatrix={TileMatrix}&TileRow={TileRow}&TileCol={TileCol}&style=default&format=tiles&tk=" + n,
70
+ }), I = new s({
71
+ url: "http://{s}.tianditu.gov.cn/ter_w/wmts?service=wmts&request=GetTile&version=1.0.0&LAYER=ter&tileMatrixSet=w&TileMatrix={TileMatrix}&TileRow={TileRow}&TileCol={TileCol}&style=default&format=tiles&tk=" + m,
72
72
  layer: "ter",
73
73
  style: "default",
74
74
  format: "image/jpeg",
75
75
  tileMatrixSetID: "11",
76
76
  subdomains: ["t0", "t1", "t2", "t3", "t4", "t5", "t6", "t7"],
77
- credit: new o("天地图地形渲晕"),
77
+ credit: new l("天地图地形渲晕"),
78
78
  maximumLevel: 18
79
- }), G = new m({
80
- url: "http://{s}.tianditu.gov.cn/cta_w/wmts?service=wmts&request=GetTile&version=1.0.0&LAYER=cta&tileMatrixSet=w&TileMatrix={TileMatrix}&TileRow={TileRow}&TileCol={TileCol}&style=default&format=tiles&tk=" + n,
79
+ }), g = new s({
80
+ url: "http://{s}.tianditu.gov.cn/cta_w/wmts?service=wmts&request=GetTile&version=1.0.0&LAYER=cta&tileMatrixSet=w&TileMatrix={TileMatrix}&TileRow={TileRow}&TileCol={TileCol}&style=default&format=tiles&tk=" + m,
81
81
  layer: "cta",
82
82
  style: "default",
83
83
  format: "image/jpeg",
84
84
  tileMatrixSetID: "w",
85
85
  subdomains: ["t0", "t1", "t2", "t3", "t4", "t5", "t6", "t7"],
86
- credit: new o("天地图地形渲晕注记"),
86
+ credit: new l("天地图地形渲晕注记"),
87
87
  maximumLevel: 18
88
- }), s = {
88
+ }), a = {
89
89
  BING_IMG: Symbol("BING_IMG"),
90
90
  //必应图影像
91
91
  BING_IMG_NIGHT: Symbol("BING_IMG_NIGHT"),
@@ -121,9 +121,9 @@ const y = new c({
121
121
  MOON: Symbol("MOON")
122
122
  //月球
123
123
  };
124
- class f {
125
- constructor(a) {
126
- this.layerMap = /* @__PURE__ */ new Map(), this.viewer = a;
124
+ class h {
125
+ constructor(i) {
126
+ this.layerMap = /* @__PURE__ */ new Map(), this.viewer = i;
127
127
  }
128
128
  // private generateId() {
129
129
  // const r = Math.floor(Math.random() * 100000);
@@ -135,139 +135,112 @@ class f {
135
135
  * @param code 自定义的唯一标识
136
136
  * @param options
137
137
  */
138
- addLayer(a, t) {
139
- const e = this.viewer.imageryLayers.addImageryProvider(a);
138
+ addLayer(i, t) {
139
+ console.log("----------addLayer-----------"), console.log(t);
140
+ const e = this.viewer.imageryLayers.addImageryProvider(i);
140
141
  t && (t.code !== void 0 && (this.layerMap.set(t.code, e), console.log(this.layerMap)), t.show !== void 0 && (e.show = t.show), t.alpha !== void 0 && (e.alpha = t.alpha), t.brightness !== void 0 && (e.brightness = t.brightness), t.contrast !== void 0 && (e.contrast = t.contrast), t.hue !== void 0 && (e.hue = t.hue), t.saturation !== void 0 && (e.saturation = t.saturation), t.gamma !== void 0 && (e.gamma = t.gamma));
141
142
  }
142
143
  setIonToken() {
143
144
  T.defaultAccessToken = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiI3NGNiZWIyNC04ZDEyLTRmMTctYjhkOS00NTQyM2JlZDFhMTUiLCJpZCI6Mjg4Mzc1LCJpYXQiOjE3NDQxNzgzMjR9.zjzR0GFshIGU0yxjbf2hAmVSwX3xribhGzDfl-Gv6q4";
144
145
  }
145
- addCPLayer(a, t) {
146
- let e = null, r = "";
147
- switch (a) {
148
- case s.BING_IMG:
149
- this.setIonToken(), l.fromAssetId(2).then((i) => {
150
- e = i, r = "bing_img";
151
- }).catch((i) => {
152
- console.error("必应影像地图加载失败", i);
153
- });
146
+ async addCPLayer(i, t) {
147
+ let e = null;
148
+ switch (i) {
149
+ case a.BING_IMG:
150
+ this.setIonToken(), e = await r.fromAssetId(2);
154
151
  break;
155
- case s.BING_IMG_NIGHT:
156
- this.setIonToken(), l.fromAssetId(3812).then((i) => {
157
- e = i, r = "bing_img_night";
158
- }).catch((i) => {
159
- console.error("必应影像夜间地图加载失败", i);
160
- });
152
+ case a.BING_IMG_NIGHT:
153
+ this.setIonToken(), e = await r.fromAssetId(3812);
161
154
  break;
162
- case s.BING_IMG_S:
163
- this.setIonToken(), l.fromAssetId(2411391).then((i) => {
164
- e = i, r = "bing_img_sign";
165
- }).catch((i) => {
166
- console.error("必应影像地图注记加载失败", i);
167
- });
155
+ case a.BING_IMG_S:
156
+ this.setIonToken(), e = await r.fromAssetId(2411391);
168
157
  break;
169
- case s.GOOGLE_IMG:
170
- this.setIonToken(), l.fromAssetId(3830182).then((i) => {
171
- e = i, r = "bing_img_sign";
172
- }).catch((i) => {
173
- console.error("谷歌影像地图注记加载失败", i);
174
- });
158
+ case a.GOOGLE_IMG:
159
+ this.setIonToken(), e = await r.fromAssetId(3830182);
175
160
  break;
176
- case s.GOOGLE_IMG_S:
177
- this.setIonToken(), l.fromAssetId(3830185).then((i) => {
178
- e = i, r = "bing_img_sign";
179
- }).catch((i) => {
180
- console.error("谷歌影像地图注记加载失败", i);
181
- });
161
+ case a.GOOGLE_IMG_S:
162
+ this.setIonToken(), e = await r.fromAssetId(3830185);
182
163
  break;
183
- case s.MARS:
184
- this.setIonToken(), l.fromAssetId(3644333).then((i) => {
185
- e = i, r = "mars";
186
- }).catch((i) => {
187
- console.error("火星影像加载失败", i);
188
- });
164
+ case a.MARS:
165
+ this.setIonToken(), e = await r.fromAssetId(3644333);
189
166
  break;
190
- case s.MOON:
191
- this.setIonToken(), l.fromAssetId(2684829).then((i) => {
192
- e = i, r = "moon";
193
- }).catch((i) => {
194
- console.error("月球影像加载失败", i);
195
- });
167
+ case a.MOON:
168
+ this.setIonToken(), e = await r.fromAssetId(2684829);
196
169
  break;
197
- case s.AMAP_IMG:
198
- e = y, r = "amap_img";
170
+ case a.AMAP_IMG:
171
+ e = c;
199
172
  break;
200
- case s.AMAP_IMG_S:
201
- e = M, r = "amap_img_s";
173
+ case a.AMAP_IMG_S:
174
+ e = y;
202
175
  break;
203
- case s.AMAP_VEC:
204
- e = d, r = "amap_vec";
176
+ case a.AMAP_VEC:
177
+ e = _;
205
178
  break;
206
- case s.AMAP_VEC_S:
207
- e = w, r = "amap_vec_s";
179
+ case a.AMAP_VEC_S:
180
+ e = w;
208
181
  break;
209
- case s.TDT_IMG:
210
- e = g, r = "tdt_img";
182
+ case a.TDT_IMG:
183
+ e = M;
211
184
  break;
212
- case s.TDT_IMG_S:
213
- e = v, r = "tdt_img_s";
185
+ case a.TDT_IMG_S:
186
+ e = d;
214
187
  break;
215
- case s.TDT_VEC:
216
- e = u, r = "tdt_vec";
188
+ case a.TDT_VEC:
189
+ e = u;
217
190
  break;
218
- case s.TDT_VEC_S:
219
- e = I, r = "tdt_vec_s";
191
+ case a.TDT_VEC_S:
192
+ e = v;
220
193
  break;
221
- case s.TDT_TER:
222
- e = h, r = "tdt_ter";
194
+ case a.TDT_TER:
195
+ e = I;
223
196
  break;
224
- case s.TDT_TER_S:
225
- e = G, r = "tdt_ter_s";
197
+ case a.TDT_TER_S:
198
+ e = g;
226
199
  break;
227
200
  }
228
- t || (t = {}), t.code || (t.code = r), console.log(t), e && this.addLayer(e, t);
201
+ e && this.addLayer(e, t);
229
202
  }
230
- getLayerByCode(a) {
231
- let t = this.layerMap.get(a);
203
+ getLayerByCode(i) {
204
+ let t = this.layerMap.get(i);
232
205
  return t || null;
233
206
  }
234
207
  /**
235
208
  * 清除图层(物理清除)
236
209
  * @param layer
237
210
  */
238
- clearLayer(a) {
211
+ clearLayer(i) {
239
212
  for (const [t, e] of this.layerMap)
240
- e === a && this.layerMap.delete(t);
241
- this.viewer.imageryLayers.remove(a, !0);
213
+ e === i && this.layerMap.delete(t);
214
+ this.viewer.imageryLayers.remove(i, !0);
242
215
  }
243
216
  /**
244
217
  * 删除图层
245
218
  * @param layer
246
219
  */
247
- removeLayer(a) {
248
- this.viewer.imageryLayers.remove(a, !1);
220
+ removeLayer(i) {
221
+ this.viewer.imageryLayers.remove(i, !1);
249
222
  }
250
223
  /**
251
224
  *
252
225
  * @param layer
253
226
  */
254
- raiseToTop(a) {
255
- this.viewer.imageryLayers.raiseToTop(a);
227
+ raiseToTop(i) {
228
+ this.viewer.imageryLayers.raiseToTop(i);
256
229
  }
257
- lowerToBottom(a) {
258
- this.viewer.imageryLayers.lowerToBottom(a);
230
+ lowerToBottom(i) {
231
+ this.viewer.imageryLayers.lowerToBottom(i);
259
232
  }
260
- raise(a) {
261
- this.viewer.imageryLayers.raise(a);
233
+ raise(i) {
234
+ this.viewer.imageryLayers.raise(i);
262
235
  }
263
- lower(a) {
264
- this.viewer.imageryLayers.lower(a);
236
+ lower(i) {
237
+ this.viewer.imageryLayers.lower(i);
265
238
  }
266
239
  removeAllLayers() {
267
240
  this.layerMap.clear(), this.viewer.imageryLayers.removeAll();
268
241
  }
269
242
  }
270
243
  export {
271
- s as C,
272
- f as L
244
+ a as C,
245
+ h as L
273
246
  };
package/index.css CHANGED
@@ -1 +1 @@
1
- .cp-porket-compass[data-v-52d8d836]{position:absolute;z-index:1000;width:100px;height:100px;cursor:pointer}.cp-porket-ruler[data-v-8e93d8ff]{z-index:1000;width:100px;height:20px;text-align:center;padding-top:2px;font-size:12px;color:#ebebeb}.cp-porket-ruler-line[data-v-8e93d8ff]{width:100px;height:5px;border-bottom:1px solid #eeeeee;border-left:2px solid #eeeeee;border-right:2px solid #eeeeee;margin-top:-2px}.cp-porket-coord[data-v-064db41e]{z-index:1000;width:200px;height:26px;text-align:center;font-size:12px;display:flex;justify-content:space-around;color:#eee}.cp-overlay[data-v-2b05e7d5]{position:absolute;z-index:100;font-size:12px}.cp-overlay-close[data-v-2b05e7d5]{position:absolute;right:0;top:0;z-index:10;width:30px;height:30px;line-height:30px;text-align:center;cursor:pointer}.cp-overlay-close-img[data-v-2b05e7d5]{width:30px;height:30px;color:#fff}.cesium-html-marker[data-v-da185123]{pointer-events:auto;z-index:1000}.pin-container[data-v-da185123]{position:absolute;z-index:20;color:#eee;font-size:12px;text-shadow:-1px -1px 0 #06012c,1px -1px 0 #06012c,-1px 1px 0 #06012c,1px 1px 0 #06012c;margin:0;padding:5px;border-radius:4px}.cp-layersmap-header[data-v-5cf567e2]{height:24px;line-height:20px;font-size:12px;background-color:#000c;display:flex;justify-content:space-around;align-items:center}.cp-layersmap-layer[data-v-5cf567e2]{width:60px;height:60px;position:relative;margin-left:2px;margin-top:2px;margin-bottom:2px;cursor:pointer}.cp-layersmap-main-header[data-v-5cf567e2]{position:absolute;z-index:1;width:100%;height:16px;line-height:16px;text-align:center;font-size:12px;background-color:#4449}.cp-layersmap-main-image[data-v-5cf567e2]{width:60px;height:60px}.cp-layersmap-main-footer[data-v-5cf567e2]{position:absolute;bottom:0;z-index:1;width:100%;display:flex;justify-content:center;align-items:center;height:14px;font-size:10px;background-color:#4449}.cp-layersmap-active[data-v-5cf567e2]{background-color:#0047e0cc}.cp-layersmap[data-v-5cf567e2]{position:absolute;z-index:10;color:#eee;background-color:#000c;border:1px solid rgb(61,64,105);border-radius:4px}.cp-layersmap-main[data-v-5cf567e2]{display:flex;justify-content:space-around;padding-right:2px}.czml-config[data-v-4bb4e701]{position:fixed;left:0;bottom:60px;z-index:100;width:60x;background-color:#0006;border-top:1px solid rgb(60,60,60);border-right:1px solid rgb(60,60,60);border-radius:4px;padding:6px;font-size:12px;color:#ccc}.czml-config-title[data-v-4bb4e701]{padding-bottom:6px;border-bottom:1px solid #222222;font-weight:500;font-size:14px}.czml-config-label[data-v-4bb4e701]{color:#87ceeb;padding:4px 0}.czmlBar[data-v-4bb4e701]{position:fixed;bottom:0;z-index:100;height:60px;width:100%;display:flex;justify-content:space-between;flex-direction:row;background-color:#0006;font-size:12px;color:#ccc}.bar-control[data-v-4bb4e701]{width:220px;-webkit-user-select:none;user-select:none}.control-btns[data-v-4bb4e701]{display:flex;justify-content:space-around;align-items:center;padding-top:8px}.control-btns div[data-v-4bb4e701]{width:22px;height:22px;border-radius:2px;display:flex;justify-content:center;align-items:center;background-color:#ffffff4d}.control-btns img[data-v-4bb4e701]{width:14px}.control-bottom[data-v-4bb4e701]{height:30px;display:flex;justify-content:space-between;align-items:center;padding:0 10px;color:#ff0}.bar-timeline[data-v-4bb4e701]{flex:1 1 auto;padding:10px;position:relative}.timeline-left[data-v-4bb4e701]{position:absolute;top:6px;left:10px}.timeline-right[data-v-4bb4e701]{position:absolute;top:6px;right:10px}.timeline-ruler[data-v-4bb4e701]{position:relative;height:26px;margin-top:20px;margin-left:0;border-bottom:1px;border-bottom-style:solid;border-bottom-color:gray}.ruler-label[data-v-4bb4e701]{position:absolute;top:-30px;transform:translate(-25%)}.tick[data-v-4bb4e701]{position:absolute;bottom:0;width:0;height:6px;border-left:1px solid rgba(170,180,190,.45);font-size:10px}.grabbing[data-v-4bb4e701]{cursor:grabbing}.tick-major[data-v-4bb4e701]{height:12px;border-left:1px solid rgba(170,180,190,.45)}.playhead[data-v-4bb4e701]{position:absolute;top:0;bottom:0;width:0;z-index:5;transform:translate(-50%);pointer-events:none}.playhead__tri[data-v-4bb4e701]{position:absolute;top:0;left:70%;width:0;height:0;border-left:6px solid transparent;border-right:6px solid transparent;border-top:8px solid #ffff00;transform:translate(-50%);filter:drop-shadow(0 1px 1px #ffff00)}.playhead__line[data-v-4bb4e701]{position:absolute;top:10px;bottom:0;left:0;width:1px;background:#ff0}@media (max-width: 720px){.czml-config[data-v-4bb4e701]{bottom:120px}.czmlBar[data-v-4bb4e701]{height:120px;flex-direction:column;gap:6px;min-height:0}.bar-control[data-v-4bb4e701]{width:100%;display:flex;justify-content:space-between}.control-btns[data-v-4bb4e701]{width:55%}.control-bottom[data-v-4bb4e701]{flex:1}}
1
+ .cp-porket-compass[data-v-52d8d836]{position:absolute;z-index:1000;width:100px;height:100px;cursor:pointer}.cp-porket-ruler[data-v-8e93d8ff]{z-index:1000;width:100px;height:20px;text-align:center;padding-top:2px;font-size:12px;color:#ebebeb}.cp-porket-ruler-line[data-v-8e93d8ff]{width:100px;height:5px;border-bottom:1px solid #eeeeee;border-left:2px solid #eeeeee;border-right:2px solid #eeeeee;margin-top:-2px}.cp-porket-coord[data-v-064db41e]{z-index:1000;width:200px;height:26px;text-align:center;font-size:12px;display:flex;justify-content:space-around;color:#eee}.cp-overlay[data-v-2b05e7d5]{position:absolute;z-index:100;font-size:12px}.cp-overlay-close[data-v-2b05e7d5]{position:absolute;right:0;top:0;z-index:10;width:30px;height:30px;line-height:30px;text-align:center;cursor:pointer}.cp-overlay-close-img[data-v-2b05e7d5]{width:30px;height:30px;color:#fff}.cesium-html-marker[data-v-da185123]{pointer-events:auto;z-index:1000}.pin-container[data-v-da185123]{position:absolute;z-index:20;color:#eee;font-size:12px;text-shadow:-1px -1px 0 #06012c,1px -1px 0 #06012c,-1px 1px 0 #06012c,1px 1px 0 #06012c;margin:0;padding:5px;border-radius:4px}.cp-layersmap-header[data-v-ad13c473]{height:24px;line-height:20px;font-size:12px;background-color:#000c;display:flex;justify-content:space-around;align-items:center}.cp-layersmap-layer[data-v-ad13c473]{width:60px;height:60px;position:relative;margin-left:2px;margin-top:2px;margin-bottom:2px;cursor:pointer}.cp-layersmap-main-header[data-v-ad13c473]{position:absolute;z-index:1;width:100%;height:16px;line-height:16px;text-align:center;font-size:12px;background-color:#4449}.cp-layersmap-main-image[data-v-ad13c473]{width:60px;height:60px}.cp-layersmap-main-footer[data-v-ad13c473]{position:absolute;bottom:0;z-index:1;width:100%;display:flex;justify-content:center;align-items:center;height:14px;font-size:10px;background-color:#4449}.cp-layersmap-active[data-v-ad13c473]{background-color:#0047e0cc}.cp-layersmap[data-v-ad13c473]{position:absolute;z-index:10;color:#eee;background-color:#000c;border:1px solid rgb(61,64,105);border-radius:4px}.cp-layersmap-main[data-v-ad13c473]{display:flex;justify-content:space-around;padding-right:2px}.czml-config[data-v-4bb4e701]{position:fixed;left:0;bottom:60px;z-index:100;width:60x;background-color:#0006;border-top:1px solid rgb(60,60,60);border-right:1px solid rgb(60,60,60);border-radius:4px;padding:6px;font-size:12px;color:#ccc}.czml-config-title[data-v-4bb4e701]{padding-bottom:6px;border-bottom:1px solid #222222;font-weight:500;font-size:14px}.czml-config-label[data-v-4bb4e701]{color:#87ceeb;padding:4px 0}.czmlBar[data-v-4bb4e701]{position:fixed;bottom:0;z-index:100;height:60px;width:100%;display:flex;justify-content:space-between;flex-direction:row;background-color:#0006;font-size:12px;color:#ccc}.bar-control[data-v-4bb4e701]{width:220px;-webkit-user-select:none;user-select:none}.control-btns[data-v-4bb4e701]{display:flex;justify-content:space-around;align-items:center;padding-top:8px}.control-btns div[data-v-4bb4e701]{width:22px;height:22px;border-radius:2px;display:flex;justify-content:center;align-items:center;background-color:#ffffff4d}.control-btns img[data-v-4bb4e701]{width:14px}.control-bottom[data-v-4bb4e701]{height:30px;display:flex;justify-content:space-between;align-items:center;padding:0 10px;color:#ff0}.bar-timeline[data-v-4bb4e701]{flex:1 1 auto;padding:10px;position:relative}.timeline-left[data-v-4bb4e701]{position:absolute;top:6px;left:10px}.timeline-right[data-v-4bb4e701]{position:absolute;top:6px;right:10px}.timeline-ruler[data-v-4bb4e701]{position:relative;height:26px;margin-top:20px;margin-left:0;border-bottom:1px;border-bottom-style:solid;border-bottom-color:gray}.ruler-label[data-v-4bb4e701]{position:absolute;top:-30px;transform:translate(-25%)}.tick[data-v-4bb4e701]{position:absolute;bottom:0;width:0;height:6px;border-left:1px solid rgba(170,180,190,.45);font-size:10px}.grabbing[data-v-4bb4e701]{cursor:grabbing}.tick-major[data-v-4bb4e701]{height:12px;border-left:1px solid rgba(170,180,190,.45)}.playhead[data-v-4bb4e701]{position:absolute;top:0;bottom:0;width:0;z-index:5;transform:translate(-50%);pointer-events:none}.playhead__tri[data-v-4bb4e701]{position:absolute;top:0;left:70%;width:0;height:0;border-left:6px solid transparent;border-right:6px solid transparent;border-top:8px solid #ffff00;transform:translate(-50%);filter:drop-shadow(0 1px 1px #ffff00)}.playhead__line[data-v-4bb4e701]{position:absolute;top:10px;bottom:0;left:0;width:1px;background:#ff0}@media (max-width: 720px){.czml-config[data-v-4bb4e701]{bottom:120px}.czmlBar[data-v-4bb4e701]{height:120px;flex-direction:column;gap:6px;min-height:0}.bar-control[data-v-4bb4e701]{width:100%;display:flex;justify-content:space-between}.control-btns[data-v-4bb4e701]{width:55%}.control-bottom[data-v-4bb4e701]{flex:1}}
package/index.d.ts CHANGED
@@ -12,6 +12,6 @@ declare const _default: {
12
12
  export default _default;
13
13
  export { cpCompass, cpRuler, cpCoord, cpOverlay, cpPin, cpLayers, cpCzmlPlayer };
14
14
  export * from './pin';
15
- export * from './layers';
16
15
  export * from './drawer';
17
16
  export * from './gauger';
17
+ export * from './layers';
package/index.js CHANGED
@@ -3,8 +3,8 @@ import * as cA from "three";
3
3
  import { TrianglesDrawMode as EP, TriangleFanDrawMode as mA, TriangleStripDrawMode as _A, Loader as lP, LoaderUtils as rA, FileLoader as $A, Color as G, LinearSRGBColorSpace as K, SpotLight as oP, PointLight as pP, DirectionalLight as uP, MeshBasicMaterial as BA, SRGBColorSpace as gA, MeshPhysicalMaterial as q, Vector2 as AP, Matrix4 as QA, Vector3 as $, Quaternion as PP, InstancedMesh as aP, InstancedBufferAttribute as MP, Object3D as eP, TextureLoader as iP, ImageBitmapLoader as fP, BufferAttribute as EA, InterleavedBuffer as bP, InterleavedBufferAttribute as kP, LinearMipmapLinearFilter as nP, NearestMipmapLinearFilter as mP, LinearMipmapNearestFilter as dP, NearestMipmapNearestFilter as yP, LinearFilter as dA, NearestFilter as tP, RepeatWrapping as yA, MirroredRepeatWrapping as jP, ClampToEdgeWrapping as UP, PointsMaterial as HP, Material as lA, LineBasicMaterial as SP, MeshStandardMaterial as sP, DoubleSide as LP, PropertyBinding as OP, BufferGeometry as qP, SkinnedMesh as hP, Mesh as JP, LineSegments as KP, Line as NP, LineLoop as YP, Points as VP, Group as oA, PerspectiveCamera as xP, MathUtils as GP, OrthographicCamera as ZP, Skeleton as XP, AnimationClip as WP, Bone as FP, InterpolateDiscrete as RP, InterpolateLinear as BP, ColorManagement as hA, Texture as JA, VectorKeyframeTrack as KA, NumberKeyframeTrack as NA, QuaternionKeyframeTrack as YA, FrontSide as _P, Interpolant as $P, Box3 as Ae, Sphere as Pe } from "three";
4
4
  import { Viewer as W, Math as CA, Cartesian2 as DA, Cartesian3 as Y, Cartographic as rP, SceneTransforms as ee, Ray as ne, Color as te, ScreenSpaceEventType as pA, ScreenSpaceEventHandler as se, createWorldTerrainAsync as Be, EllipsoidTerrainProvider as re, JulianDate as J, CzmlDataSource as ve } from "cesium";
5
5
  import { P as tA, a as VA, b as ge, c as Ce, d as ce, C as xA } from "./index-CcaLwHv1.js";
6
- import { L as De } from "./LayersManager-D8uhBfwn.js";
7
- import { C as Tt } from "./LayersManager-D8uhBfwn.js";
6
+ import { L as De } from "./LayersManager-DcmcsGva.js";
7
+ import { C as Tt } from "./LayersManager-DcmcsGva.js";
8
8
  import { C as Et, a as lt, b as ot, D as pt, P as ut, R as at } from "./CircleDrawer-DlT8c84Y.js";
9
9
  import { C as it, L as ft, P as bt, a as kt, R as mt } from "./PolygonGaguger-DrRpBgxG.js";
10
10
  function GA(D, A) {
@@ -2231,7 +2231,7 @@ const Xe = /* @__PURE__ */ Z({
2231
2231
  ])
2232
2232
  ], 32));
2233
2233
  }
2234
- }), un = /* @__PURE__ */ F(pn, [["__scopeId", "data-v-5cf567e2"]]);
2234
+ }), un = /* @__PURE__ */ F(pn, [["__scopeId", "data-v-ad13c473"]]);
2235
2235
  function an(D, A, { signal: P, edges: s } = {}) {
2236
2236
  let e, t = null;
2237
2237
  const n = s != null && s.includes("leading"), B = s == null || s.includes("trailing"), r = () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cesium-pocket",
3
- "version": "0.5.7-alpha",
3
+ "version": "0.5.8-alpha",
4
4
  "description": "cesium的插件库;基于vue3的开发",
5
5
  "module": "./index.js",
6
6
  "types": "./index.d.ts",
@@ -44,7 +44,7 @@ export declare class LayersManager {
44
44
  */
45
45
  addLayer(imageryProvider: ImageryProvider, options?: LayerOption): void;
46
46
  private setIonToken;
47
- addCPLayer(cpLayer: CP_LAYER_TYPE, options?: LayerOption): void;
47
+ addCPLayer(cpLayer: CP_LAYER_TYPE, options?: LayerOption): Promise<void>;
48
48
  getLayerByCode(code: string): ImageryLayer | null;
49
49
  /**
50
50
  * 清除图层(物理清除)
package/tianmap.js CHANGED
@@ -1,4 +1,4 @@
1
- import { C as e, L as s } from "./LayersManager-D8uhBfwn.js";
1
+ import { C as e, L as s } from "./LayersManager-DcmcsGva.js";
2
2
  export {
3
3
  e as CP_LAYER,
4
4
  s as LayersManager