cesium-pocket 0.5.5-alpha → 0.5.7-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,4 +1,4 @@
1
- import { CustomDataSource as O, Cartesian3 as r, JulianDate as U, defined as h, HeightReference as M, Color as E, EntityCollection as N, ScreenSpaceEventType as c, ConstantPositionProperty as A, ScreenSpaceEventHandler as C, VerticalOrigin as G, KeyboardEventModifier as b, PolylineDashMaterialProperty as x, CallbackProperty as p, PolygonHierarchy as B, Cartographic as P, Transforms as F, Matrix4 as m, EllipsoidGeodesic as Q } from "cesium";
1
+ import { CustomDataSource as O, Cartesian3 as r, JulianDate as U, defined as h, HeightReference as M, Color as E, EntityCollection as N, ScreenSpaceEventType as c, ConstantPositionProperty as A, ScreenSpaceEventHandler as C, VerticalOrigin as G, KeyboardEventModifier as b, PolylineDashMaterialProperty as x, CallbackProperty as f, PolygonHierarchy as B, Cartographic as P, Transforms as F, Matrix4 as m, EllipsoidGeodesic as Q } from "cesium";
2
2
  import { toRaw as u } from "vue";
3
3
  const l = {
4
4
  STOPED: Symbol("STOPED"),
@@ -159,16 +159,20 @@ class S extends W {
159
159
  }
160
160
  //在删除状态下,删除节点
161
161
  deletePoint(e) {
162
- this.delConfirmFun && this.delConfirmFun().then((t) => {
162
+ console.log("-----------------"), console.log(this.delConfirmFun), this.delConfirmFun ? this.delConfirmFun().then((t) => {
163
163
  t && (this.dataSource.entities.remove(e), this.dsToMd(), this.delCallbackFun && this.delCallbackFun());
164
- });
165
- }
166
- delCallback() {
167
- return new Promise((e) => {
168
- const t = confirm("确定删除吗?");
169
- e(!!t);
170
- });
171
- }
164
+ }) : confirm("确定删除吗?") && (this.dataSource.entities.remove(e), this.dsToMd(), this.delCallbackFun && this.delCallbackFun());
165
+ }
166
+ // protected delCallback(): Promise<boolean> {
167
+ // return new Promise((resolve) => {
168
+ // const result: boolean = confirm("确定删除吗?");
169
+ // if (result) {
170
+ // resolve(true);
171
+ // } else {
172
+ // resolve(false);
173
+ // }
174
+ // });
175
+ // }
172
176
  }
173
177
  class _ extends S {
174
178
  constructor(e, t = null) {
@@ -221,7 +225,7 @@ class _ extends S {
221
225
  } else
222
226
  this.delUnable();
223
227
  }, c.MOUSE_MOVE);
224
- }, t && (this.addPointFun = t.addPointFun ? t.addPointFun : this.addBillboardCallback, this.delConfirmFun = t.delConfirmFun ? t.delConfirmFun : this.delCallback, t.afterAddPointFun && (this.afterAddPointFun = t.afterAddPointFun), t.editPointFun && (this.editPointFun = t.editPointFun));
228
+ }, t && (this.addPointFun = t.addPointFun ? t.addPointFun : this.addBillboardCallback, t.afterAddPointFun && (this.afterAddPointFun = t.afterAddPointFun), t.editPointFun && (this.editPointFun = t.editPointFun), t.delConfirmFun && (this.delConfirmFun = t.delConfirmFun));
225
229
  }
226
230
  start() {
227
231
  super.drawableStatus(), this.handler || (this.handler = new C(this.viewer.scene.canvas)), this.point_L_ClickEvent(), this.point_L_DownEvent(), this.point_L_UpEvent(), this.point_moveEvent();
@@ -346,7 +350,7 @@ class Z extends S {
346
350
  }),
347
351
  show: !0,
348
352
  clampToGround: !0
349
- }, i.positions = new p(() => {
353
+ }, i.positions = new f(() => {
350
354
  let a = this.mainData.length, n = this.mainData[a - 1];
351
355
  return n || (n = this.mainData[a - 2]), this.dashEndData ? [n, this.dashEndData] : [n, new r()];
352
356
  }, !1), this.dashLineEntity = this.viewer.entities.add({
@@ -355,7 +359,7 @@ class Z extends S {
355
359
  entityType: "DASHLINE"
356
360
  }
357
361
  });
358
- }, t && (t.drawerMode && (this.drawerMode = t.drawerMode), this.point = t.point, this.polyline = t.polyline, this.deshline = t.deshline, this.polygon = t.polygon, t.afterAddPointFun && (this.afterAddPointFun = t.afterAddPointFun), t.movingCallbackFun && (this.movingCallbackFun = t.movingCallbackFun), t.editCallbackFun && (this.editCallbackFun = t.editCallbackFun), t.delCallbackFun && (this.delCallbackFun = t.delCallbackFun), t.stopDrawCallbackFun && (this.stopDrawCallbackFun = t.stopDrawCallbackFun), this.delConfirmFun = t.delConfirmFun ? t.delConfirmFun : this.delCallback);
362
+ }, t && (t.drawerMode && (this.drawerMode = t.drawerMode), this.point = t.point, this.polyline = t.polyline, this.deshline = t.deshline, this.polygon = t.polygon, t.afterAddPointFun && (this.afterAddPointFun = t.afterAddPointFun), t.movingCallbackFun && (this.movingCallbackFun = t.movingCallbackFun), t.editCallbackFun && (this.editCallbackFun = t.editCallbackFun), t.delCallbackFun && (this.delCallbackFun = t.delCallbackFun), t.stopDrawCallbackFun && (this.stopDrawCallbackFun = t.stopDrawCallbackFun), t.delConfirmFun && (this.delConfirmFun = t.delConfirmFun));
359
363
  }
360
364
  start() {
361
365
  super.drawableStatus(), this.handler || (this.handler = new C(this.viewer.scene.canvas)), this.r_ClickEvent(), this.l_ClickEvent(), this.l_ClickCtrlEvent(), this.l_DownEvent(), this.l_UpEvent(), this.moveCtrlEvent(), this.moveEvent();
@@ -413,7 +417,7 @@ class Z extends S {
413
417
  // 是否显示
414
418
  show: !0,
415
419
  clampToGround: !0
416
- }, e.positions = new p(() => this.mainData, !1), this.mainLineEntity = this.viewer.entities.add({
420
+ }, e.positions = new f(() => this.mainData, !1), this.mainLineEntity = this.viewer.entities.add({
417
421
  polyline: e,
418
422
  properties: {
419
423
  entityType: "LINE"
@@ -427,7 +431,7 @@ class Z extends S {
427
431
  hierarchy: [new r(), new r(), new r()],
428
432
  material: E.RED.withAlpha(0.4),
429
433
  outline: !1
430
- }, e.hierarchy = new p(() => {
434
+ }, e.hierarchy = new f(() => {
431
435
  let t = this.mainData;
432
436
  return this.dashEndData && (t = [...this.mainData, this.dashEndData]), new B(t);
433
437
  }, !1), this.mainPolygonEntity = this.viewer.entities.add({
@@ -508,7 +512,7 @@ class V extends S {
508
512
  // 是否显示
509
513
  show: !0,
510
514
  clampToGround: !0
511
- }, e.positions = new p(() => [...this.mainData, this.mainData[0]], !1), this.lineEntity = this.viewer.entities.add({
515
+ }, e.positions = new f(() => [...this.mainData, this.mainData[0]], !1), this.lineEntity = this.viewer.entities.add({
512
516
  polyline: e,
513
517
  properties: {
514
518
  entityType: "LINE"
@@ -522,7 +526,7 @@ class V extends S {
522
526
  hierarchy: [new r(), new r(), new r()],
523
527
  material: E.RED.withAlpha(0.4),
524
528
  outline: !1
525
- }, e.hierarchy = new p(() => new B(this.mainData), !1), this.polygonEntity = this.viewer.entities.add({
529
+ }, e.hierarchy = new f(() => new B(this.mainData), !1), this.polygonEntity = this.viewer.entities.add({
526
530
  polygon: e,
527
531
  properties: {
528
532
  entityType: "POLYGON"
@@ -618,7 +622,7 @@ class X extends S {
618
622
  outline: !0,
619
623
  // 是否显示边框
620
624
  outlineColor: E.RED
621
- }, e.semiMinorAxis = e.semiMajorAxis = new p(() => this.distance, !1), this.ellipseEntity = this.viewer.entities.add({
625
+ }, e.semiMinorAxis = e.semiMajorAxis = new f(() => this.distance, !1), this.ellipseEntity = this.viewer.entities.add({
622
626
  position: new A(this.firstPoint),
623
627
  ellipse: e,
624
628
  properties: {
@@ -0,0 +1,273 @@
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({
3
+ url: "https://webst0{s}.is.autonavi.com/appmaptile?style=6&x={x}&y={y}&z={z}",
4
+ subdomains: ["1", "2", "3", "4"],
5
+ tilingScheme: new _(),
6
+ minimumLevel: 3,
7
+ maximumLevel: 18,
8
+ credit: "高德地图"
9
+ }), M = new c({
10
+ url: "https://webst0{s}.is.autonavi.com/appmaptile?style=8&x={x}&y={y}&z={z}",
11
+ subdomains: ["1", "2", "3", "4"],
12
+ tilingScheme: new _(),
13
+ minimumLevel: 3,
14
+ maximumLevel: 18,
15
+ credit: "高德地图"
16
+ }), d = new c({
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
+ subdomains: ["1", "2", "3", "4"],
19
+ tilingScheme: new _(),
20
+ minimumLevel: 3,
21
+ maximumLevel: 18,
22
+ credit: "高德地图"
23
+ }), w = new c({
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
+ subdomains: ["1", "2", "3", "4"],
26
+ tilingScheme: new _(),
27
+ minimumLevel: 3,
28
+ maximumLevel: 18,
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,
32
+ layer: "img",
33
+ style: "default",
34
+ format: "image/jpeg",
35
+ tileMatrixSetID: "w",
36
+ subdomains: ["t0", "t1", "t2", "t3", "t4", "t5", "t6", "t7"],
37
+ credit: new o("天地图影像"),
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,
41
+ layer: "cia",
42
+ style: "default",
43
+ format: "image/jpeg",
44
+ tileMatrixSetID: "w",
45
+ subdomains: ["t0", "t1", "t2", "t3", "t4", "t5", "t6", "t7"],
46
+ credit: new o("天地图影像注记"),
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,
50
+ layer: "vec",
51
+ //wmts请求的层名称
52
+ style: "default",
53
+ format: "image/jpeg",
54
+ tileMatrixSetID: "w",
55
+ //用于WMTS请求的TileMatrixSet的标识符。
56
+ subdomains: ["t0", "t1", "t2", "t3", "t4", "t5", "t6", "t7"],
57
+ credit: new o("天地图矢量"),
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,
61
+ layer: "vec",
62
+ //wmts请求的层名称
63
+ style: "default",
64
+ format: "image/jpeg",
65
+ tileMatrixSetID: "w",
66
+ //用于WMTS请求的TileMatrixSet的标识符。
67
+ subdomains: ["t0", "t1", "t2", "t3", "t4", "t5", "t6", "t7"],
68
+ credit: new o("天地图矢量注记"),
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,
72
+ layer: "ter",
73
+ style: "default",
74
+ format: "image/jpeg",
75
+ tileMatrixSetID: "11",
76
+ subdomains: ["t0", "t1", "t2", "t3", "t4", "t5", "t6", "t7"],
77
+ credit: new o("天地图地形渲晕"),
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,
81
+ layer: "cta",
82
+ style: "default",
83
+ format: "image/jpeg",
84
+ tileMatrixSetID: "w",
85
+ subdomains: ["t0", "t1", "t2", "t3", "t4", "t5", "t6", "t7"],
86
+ credit: new o("天地图地形渲晕注记"),
87
+ maximumLevel: 18
88
+ }), s = {
89
+ BING_IMG: Symbol("BING_IMG"),
90
+ //必应图影像
91
+ BING_IMG_NIGHT: Symbol("BING_IMG_NIGHT"),
92
+ //必应图影像夜间
93
+ BING_IMG_S: Symbol("BING_IMG_S"),
94
+ //必应图影像注记
95
+ GOOGLE_IMG: Symbol("GOOGLE_IMG"),
96
+ //google影像地图
97
+ GOOGLE_IMG_S: Symbol("GOOGLE_IMG_S"),
98
+ //google注记
99
+ TDT_IMG: Symbol("TDT_IMG"),
100
+ //天地图影像
101
+ TDT_IMG_S: Symbol("TDT_IMG_S"),
102
+ //天地图影像注记
103
+ TDT_VEC: Symbol("TDT_VEC"),
104
+ ///天地图矢量
105
+ TDT_VEC_S: Symbol("TDT_VEC_S"),
106
+ //天地图矢量注记
107
+ TDT_TER: Symbol("TDT_TER"),
108
+ //天地图地形渲晕
109
+ TDT_TER_S: Symbol("TDT_TER_S"),
110
+ //天地图地形渲晕
111
+ AMAP_IMG: Symbol("AMAP_IMG"),
112
+ //高德地图影像
113
+ AMAP_IMG_S: Symbol("AMAP_IMG_S"),
114
+ //高德地图影像
115
+ AMAP_VEC: Symbol("AMAP_VEC"),
116
+ //高德地图矢量
117
+ AMAP_VEC_S: Symbol("AMAP_VEC_S"),
118
+ //高德地图矢量注记
119
+ MARS: Symbol("MARS"),
120
+ //火星
121
+ MOON: Symbol("MOON")
122
+ //月球
123
+ };
124
+ class f {
125
+ constructor(a) {
126
+ this.layerMap = /* @__PURE__ */ new Map(), this.viewer = a;
127
+ }
128
+ // private generateId() {
129
+ // const r = Math.floor(Math.random() * 100000);
130
+ // return `${Date.now()}${r}`;
131
+ // }
132
+ /**
133
+ *
134
+ * @param imageryProvider
135
+ * @param code 自定义的唯一标识
136
+ * @param options
137
+ */
138
+ addLayer(a, t) {
139
+ const e = this.viewer.imageryLayers.addImageryProvider(a);
140
+ 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
+ setIonToken() {
143
+ T.defaultAccessToken = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiI3NGNiZWIyNC04ZDEyLTRmMTctYjhkOS00NTQyM2JlZDFhMTUiLCJpZCI6Mjg4Mzc1LCJpYXQiOjE3NDQxNzgzMjR9.zjzR0GFshIGU0yxjbf2hAmVSwX3xribhGzDfl-Gv6q4";
144
+ }
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
+ });
154
+ 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
+ });
161
+ 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
+ });
168
+ 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
+ });
175
+ 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
+ });
182
+ 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
+ });
189
+ 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
+ });
196
+ break;
197
+ case s.AMAP_IMG:
198
+ e = y, r = "amap_img";
199
+ break;
200
+ case s.AMAP_IMG_S:
201
+ e = M, r = "amap_img_s";
202
+ break;
203
+ case s.AMAP_VEC:
204
+ e = d, r = "amap_vec";
205
+ break;
206
+ case s.AMAP_VEC_S:
207
+ e = w, r = "amap_vec_s";
208
+ break;
209
+ case s.TDT_IMG:
210
+ e = g, r = "tdt_img";
211
+ break;
212
+ case s.TDT_IMG_S:
213
+ e = v, r = "tdt_img_s";
214
+ break;
215
+ case s.TDT_VEC:
216
+ e = u, r = "tdt_vec";
217
+ break;
218
+ case s.TDT_VEC_S:
219
+ e = I, r = "tdt_vec_s";
220
+ break;
221
+ case s.TDT_TER:
222
+ e = h, r = "tdt_ter";
223
+ break;
224
+ case s.TDT_TER_S:
225
+ e = G, r = "tdt_ter_s";
226
+ break;
227
+ }
228
+ t || (t = {}), t.code || (t.code = r), console.log(t), e && this.addLayer(e, t);
229
+ }
230
+ getLayerByCode(a) {
231
+ let t = this.layerMap.get(a);
232
+ return t || null;
233
+ }
234
+ /**
235
+ * 清除图层(物理清除)
236
+ * @param layer
237
+ */
238
+ clearLayer(a) {
239
+ for (const [t, e] of this.layerMap)
240
+ e === a && this.layerMap.delete(t);
241
+ this.viewer.imageryLayers.remove(a, !0);
242
+ }
243
+ /**
244
+ * 删除图层
245
+ * @param layer
246
+ */
247
+ removeLayer(a) {
248
+ this.viewer.imageryLayers.remove(a, !1);
249
+ }
250
+ /**
251
+ *
252
+ * @param layer
253
+ */
254
+ raiseToTop(a) {
255
+ this.viewer.imageryLayers.raiseToTop(a);
256
+ }
257
+ lowerToBottom(a) {
258
+ this.viewer.imageryLayers.lowerToBottom(a);
259
+ }
260
+ raise(a) {
261
+ this.viewer.imageryLayers.raise(a);
262
+ }
263
+ lower(a) {
264
+ this.viewer.imageryLayers.lower(a);
265
+ }
266
+ removeAllLayers() {
267
+ this.layerMap.clear(), this.viewer.imageryLayers.removeAll();
268
+ }
269
+ }
270
+ export {
271
+ s as C,
272
+ f as L
273
+ };
@@ -1,5 +1,5 @@
1
1
  import { Cartographic as v, EllipsoidGeodesic as Y, Cartesian3 as g, BoundingSphere as N, Transforms as y, Matrix4 as M, CustomDataSource as L, ConstantPositionProperty as d, ConstantProperty as u, Color as c, Cartesian2 as B, VerticalOrigin as F, HorizontalOrigin as T, LabelStyle as x, Math as k } from "cesium";
2
- import { a as j, R as U, P as W, D as G, C as O, b as Z } from "./CircleDrawer-CDvCK_oA.js";
2
+ import { a as j, R as U, P as W, D as G, C as O, b as Z } from "./CircleDrawer-DlT8c84Y.js";
3
3
  const A = (r, t) => {
4
4
  const l = v.fromCartesian(r), e = v.fromCartesian(t);
5
5
  return new Y(l, e).surfaceDistance;
package/drawer.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- import { PointDrawer } from './src/drawer/PointDrawer.ts';
2
- import { CP2dDrawer, CP2dOptions, DRAWER_MODE, DRAWER_MODE_TYPE } from './src/drawer/CP2dDrawer.ts';
3
- import { RectDrawer, RectOptions } from './src/drawer/RectDrawer.ts';
4
- import { CircleDrawer, CircleOptions } from './src/drawer/CircleDrawer.ts';
5
- import { DelConfirmFn } from './src/drawer/DataCenter.ts';
6
- import { DRAW_STATUS, DRAW_STATUS_TYPE } from './src/drawer/DrawerStatus.ts';
1
+ import { PointDrawer } from './src/drawer/PointDrawer';
2
+ import { CP2dDrawer, CP2dOptions, DRAWER_MODE, DRAWER_MODE_TYPE } from './src/drawer/CP2dDrawer';
3
+ import { RectDrawer, RectOptions } from './src/drawer/RectDrawer';
4
+ import { CircleDrawer, CircleOptions } from './src/drawer/CircleDrawer';
5
+ import { DelConfirmFn } from './src/drawer/DataCenter';
6
+ import { DRAW_STATUS, DRAW_STATUS_TYPE } from './src/drawer/DrawerStatus';
7
7
  export { PointDrawer, CP2dDrawer, RectDrawer, CircleDrawer, DRAW_STATUS, type DRAW_STATUS_TYPE, DRAWER_MODE, type DRAWER_MODE_TYPE, type CircleOptions, type RectOptions, type CP2dOptions, type DelConfirmFn };
package/drawer.js CHANGED
@@ -1,4 +1,4 @@
1
- import { C as D, a as e, b as s, D as R, P as w, R as o } from "./CircleDrawer-CDvCK_oA.js";
1
+ import { C as D, a as e, b as s, D as R, P as w, R as o } from "./CircleDrawer-DlT8c84Y.js";
2
2
  export {
3
3
  D as CP2dDrawer,
4
4
  e as CircleDrawer,
package/gauger.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- import { CircleGaguger, CircleGaugerOptions } from './src/gauger/CircleGaguger.ts';
2
- import { RectGaguger, RectGaugerOptions } from './src/gauger/RectGaguger.ts';
3
- import { PointGauger, PointGaugerOptions } from './src/gauger/PointGaguger.ts';
4
- import { LineGaguger, LineGaugerOptions } from './src/gauger/LineGaguger.ts';
5
- import { PolygonGaguger, PolygonGaugerOptions } from './src/gauger/PolygonGaguger.ts';
1
+ import { CircleGaguger, CircleGaugerOptions } from './src/gauger/CircleGaguger';
2
+ import { RectGaguger, RectGaugerOptions } from './src/gauger/RectGaguger';
3
+ import { PointGauger, PointGaugerOptions } from './src/gauger/PointGaguger';
4
+ import { LineGaguger, LineGaugerOptions } from './src/gauger/LineGaguger';
5
+ import { PolygonGaguger, PolygonGaugerOptions } from './src/gauger/PolygonGaguger';
6
6
  export { CircleGaguger, RectGaguger, PointGauger, LineGaguger, PolygonGaguger, type CircleGaugerOptions, type RectGaugerOptions, type PointGaugerOptions, type LineGaugerOptions, type PolygonGaugerOptions };
package/gauger.js CHANGED
@@ -1,4 +1,4 @@
1
- import { C as e, L as r, P as o, a as s, R as u } from "./PolygonGaguger-D9a5OxZy.js";
1
+ import { C as e, L as r, P as o, a as s, R as u } from "./PolygonGaguger-DrRpBgxG.js";
2
2
  export {
3
3
  e as CircleGaguger,
4
4
  r as LineGaguger,
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[data-v-3c9f5494]{position:absolute;z-index:10;color:#eee;background-color:#000c;border:1px solid rgb(61,64,105);border-radius:4px}.cp-layersmap-header[data-v-3c9f5494]{height:24px;line-height:20px;font-size:12px;background-color:#000c;display:flex;justify-content:space-around;align-items:center}.cp-layersmap-main[data-v-3c9f5494]{display:flex;justify-content:space-around;padding-right:2px}.cp-layersmap-layer[data-v-3c9f5494]{width:60px;height:60px;position:relative;margin-left:2px;margin-top:2px;margin-bottom:2px;cursor:pointer}.cp-layersmap-layer-header[data-v-3c9f5494]{position:absolute;z-index:1;width:100%;height:16px;line-height:16px;text-align:center;font-size:12px;background-color:#4449}.cp-layersmap-layer-image[data-v-3c9f5494]{width:60px;height:60px}.cp-layersmap-layer-footer[data-v-3c9f5494]{position:absolute;z-index:1;width:100%;height:16px;line-height:16px;text-align:center;font-size:12px;background-color:#4449}.cp-layersmap-active[data-v-3c9f5494]{background-color:#0047e0cc}.cp-tianmap[data-v-014b2f5e]{position:absolute;z-index:10;color:#eee;background-color:#000c;border:1px solid rgb(61,64,105);border-radius:4px}.cp-tianmap-header[data-v-014b2f5e]{height:24px;line-height:20px;font-size:12px;background-color:#000c;display:flex;justify-content:space-around;align-items:center}.cp-tianmap-main[data-v-014b2f5e]{display:flex;justify-content:space-around;padding-right:4px}.cp-tianmap-layer[data-v-014b2f5e]{width:60px;height:60px;position:relative;margin-left:4px;margin-top:4px;margin-bottom:4px;cursor:pointer}.cp-tianmap-layer-header[data-v-014b2f5e]{position:absolute;z-index:1;width:100%;height:16px;line-height:16px;text-align:center;font-size:12px;background-color:#4449}.cp-tianmap-layer-image[data-v-014b2f5e]{width:60px;height:60px}.cp-tianmap-layer-footer[data-v-014b2f5e]{position:absolute;z-index:1;width:100%;height:16px;line-height:16px;text-align:center;font-size:12px;background-color:#4449}.cp-tianmap-active[data-v-014b2f5e]{background-color:#00c6e0cc}.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-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}}
package/index.d.ts CHANGED
@@ -3,15 +3,15 @@ import { default as cpRuler } from './src/ruler/Index.vue';
3
3
  import { default as cpCoord } from './src/coord/Index.vue';
4
4
  import { default as cpOverlay } from './src/overlay/Index.vue';
5
5
  import { default as cpPin } from './src/pin/Index.vue';
6
- import { default as cpTianmap } from './src/tianmap/Index.vue';
6
+ import { default as cpLayers } from './src/layers/Index.vue';
7
7
  import { default as cpCzmlPlayer } from './src/czml/player/Index.vue';
8
8
  import { App } from 'vue';
9
9
  declare const _default: {
10
- install: (app: App) => App;
10
+ install: (app: App) => App<any>;
11
11
  };
12
12
  export default _default;
13
- export { cpCompass, cpRuler, cpCoord, cpOverlay, cpPin, cpTianmap, cpCzmlPlayer };
14
- export * from './pin.ts';
15
- export * from './tianmap.ts';
16
- export * from './drawer.ts';
17
- export * from './gauger.ts';
13
+ export { cpCompass, cpRuler, cpCoord, cpOverlay, cpPin, cpLayers, cpCzmlPlayer };
14
+ export * from './pin';
15
+ export * from './layers';
16
+ export * from './drawer';
17
+ export * from './gauger';