@soonspacejs/plugin-tiles 2.15.16 → 2.15.17
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.
- package/dist/index.esm.js +451 -326
- package/dist/plot/GroundDecalManager.d.ts +29 -17
- package/dist/plot/PlotPrimitiveBridge.d.ts +2 -2
- package/dist/plot/fly-to.d.ts +16 -0
- package/dist/plot/index.d.ts +1 -0
- package/dist/plot/plugins/base.d.ts +24 -5
- package/dist/plot/plugins/types.d.ts +2 -1
- package/dist/terrain-tiles-renderer/TerrainTilesRenderer.d.ts +8 -0
- package/package.json +3 -3
package/dist/index.esm.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { TilesRenderer as
|
|
3
|
-
import { GLTFLoader as
|
|
4
|
-
import { MathUtils as p, MeshBasicMaterial as
|
|
5
|
-
import { TilesFadePlugin as
|
|
6
|
-
import { CesiumGroundTextPrimitive as N, CesiumGroundPolylinePrimitive as
|
|
7
|
-
import { createFineArrow as
|
|
8
|
-
class
|
|
1
|
+
import L, { BaseMesh as Le } from "soonspacejs";
|
|
2
|
+
import { TilesRenderer as E } from "um-3d-tiles-renderer";
|
|
3
|
+
import { GLTFLoader as be } from "three/examples/jsm/loaders/GLTFLoader.js";
|
|
4
|
+
import { MathUtils as p, MeshBasicMaterial as Ce, Color as W, Box3 as te, Sphere as G, Vector3 as a, Matrix4 as g, Quaternion as xe, TextureLoader as Ge, Raycaster as Be, PerspectiveCamera as ce, MeshStandardMaterial as Ue, ShaderMaterial as he } from "three";
|
|
5
|
+
import { TilesFadePlugin as re, UpdateOnChangePlugin as ie, QuantizedMeshPlugin as Q, ImageOverlayPlugin as ke, XYZTilesOverlay as Te, ReorientationPlugin as se, StyledGeoJSONOverlay as de, CesiumIonOverlay as We, TMSTilesOverlay as ze, UrlTemplateTilesOverlay as Je, WMSTilesOverlay as $e, WMTSCapabilitiesLoader as je, WMTSTilesOverlay as He, CesiumIonAuthPlugin as Pe } from "um-3d-tiles-renderer/plugins";
|
|
6
|
+
import { CesiumGroundTextPrimitive as N, CesiumGroundPolylinePrimitive as D, CesiumGroundPointPrimitive as F, CesiumGroundPolygonPrimitive as ue, CesiumGroundCirclePrimitive as ge, initializeApproximateTerrainHeights as Qe, updateTerrainLogDepthUniforms as Ye, CesiumGlobeDepth as Xe, CESIUM_GROUND_NON_PICKABLE_LAYER as Ve } from "cesium-to-three/ground";
|
|
7
|
+
import { createFineArrow as Y, createCurvedArrow as Ee, createSwallowtailAttackArrow as Ie, createAttackArrow as Re, createAssaultDirectionArrow as Ne } from "cesium-to-three/arrow";
|
|
8
|
+
class qe {
|
|
9
9
|
constructor(e) {
|
|
10
10
|
this.parser = e, this.name = "KHR_texture_basisu_patch";
|
|
11
11
|
}
|
|
@@ -15,11 +15,11 @@ class He {
|
|
|
15
15
|
return null;
|
|
16
16
|
const l = t.options.ktx2Loader;
|
|
17
17
|
if (!l)
|
|
18
|
-
throw new Error(`${
|
|
18
|
+
throw new Error(`${L.utils.consoleSspTitle}请使用 setModelKtx2DecoderPath 设置 ktx2 解压库路径`);
|
|
19
19
|
return t.loadTextureImage(e, n, l);
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
|
-
class
|
|
22
|
+
class pr {
|
|
23
23
|
constructor(e) {
|
|
24
24
|
this.ssp = e;
|
|
25
25
|
const { controls: t, viewport: r } = e;
|
|
@@ -46,13 +46,13 @@ class rr {
|
|
|
46
46
|
downloadQueue = null;
|
|
47
47
|
async loadTiles(e) {
|
|
48
48
|
if (this.tilesMap.has(e)) {
|
|
49
|
-
|
|
49
|
+
L.utils.warn(`${e} already loaded`);
|
|
50
50
|
return;
|
|
51
51
|
}
|
|
52
|
-
const { ssp: t, ssp: { viewport: r } } = this, i = new
|
|
52
|
+
const { ssp: t, ssp: { viewport: r } } = this, i = new E(e);
|
|
53
53
|
this.lruCache === null ? this.lruCache = i.lruCache : i.lruCache = this.lruCache, this.parseQueue === null ? this.parseQueue = i.parseQueue : i.parseQueue = this.parseQueue, this.downloadQueue === null ? this.downloadQueue = i.downloadQueue : i.downloadQueue = this.downloadQueue;
|
|
54
|
-
const n = new
|
|
55
|
-
n.register((d) => new
|
|
54
|
+
const n = new be(i.manager);
|
|
55
|
+
n.register((d) => new qe(d));
|
|
56
56
|
const { dracoLoader: o, ktx2Loader: l, meshoptDecoder: h } = t.manager.store.modelManager.gltfLoader;
|
|
57
57
|
o && n.setDRACOLoader(o), l && n.setKTX2Loader(l), h && n.setMeshoptDecoder(h), i.manager.addHandler(/\.gltf$/, n), this.tilesMap.set(e, i), i.setCamera(this._tilesCamera), i.setResolutionFromRenderer(this._tilesCamera, r.renderer), i.lruCache.maxSize = 600, i.lruCache.minSize = 300, i.lruCache.unloadPercent = 0.8, t.addObject(i.group);
|
|
58
58
|
const c = () => {
|
|
@@ -69,31 +69,31 @@ class rr {
|
|
|
69
69
|
return t ? (t.dispose(), this.tilesMap.delete(e), this.ssp.removeObject(t.group), !0) : !1;
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
|
-
let
|
|
72
|
+
let Ze = class {
|
|
73
73
|
priority = -999;
|
|
74
74
|
processTileModel(e) {
|
|
75
75
|
e.traverse((t) => {
|
|
76
|
-
t.material && (t.material = new
|
|
76
|
+
t.material && (t.material = new Ce());
|
|
77
77
|
});
|
|
78
78
|
}
|
|
79
79
|
};
|
|
80
|
-
const
|
|
81
|
-
class
|
|
80
|
+
const Ke = "https://sooncps.xwbuilders.com/api/ugis-dataprocess/v1/terrain/NhBLlMx3/";
|
|
81
|
+
class yr {
|
|
82
82
|
constructor(e) {
|
|
83
|
-
this.ssp = e, this.tiles = new
|
|
83
|
+
this.ssp = e, this.tiles = new E(Ke), this.tiles.fetchData = async (t, r) => {
|
|
84
84
|
if (/layer\.json$/.test(t)) {
|
|
85
85
|
const i = await fetch(t, r).then((n) => n.json());
|
|
86
86
|
return i.metadataAvailability = -1, new Response(JSON.stringify(i));
|
|
87
87
|
}
|
|
88
88
|
return fetch(t, r);
|
|
89
|
-
}, this.tilesFadePlugin = new
|
|
89
|
+
}, this.tilesFadePlugin = new re({ maximumFadeOutTiles: 200 }), this.updateOnChangePlugin = new ie(), this.quantizedPlugin = new Q({}), this.customMaterialPlugin = new Ze(), this.imageOverlayPlugin = new ke({
|
|
90
90
|
renderer: e.viewport.renderer,
|
|
91
91
|
overlays: [
|
|
92
|
-
new
|
|
92
|
+
new Te({
|
|
93
93
|
url: "https://server.arcgisonline.com/arcgis/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}"
|
|
94
94
|
})
|
|
95
95
|
]
|
|
96
|
-
}), this.reorientationPlugin = new
|
|
96
|
+
}), this.reorientationPlugin = new se({
|
|
97
97
|
lon: 120,
|
|
98
98
|
lat: 30,
|
|
99
99
|
height: 0.1
|
|
@@ -141,7 +141,7 @@ class sr {
|
|
|
141
141
|
), this.loedTilesSets.clear(), this.tiles.removeEventListener("needs-render", this.render), this.tiles.removeEventListener("needs-update", this.render), this.tiles.dispose();
|
|
142
142
|
}
|
|
143
143
|
}
|
|
144
|
-
class
|
|
144
|
+
class et {
|
|
145
145
|
// 使用较低的 priority 确保在 ImageOverlayPlugin 之后执行
|
|
146
146
|
// ImageOverlayPlugin 默认 priority 是 -1
|
|
147
147
|
priority = -999;
|
|
@@ -152,7 +152,7 @@ class Xe {
|
|
|
152
152
|
*/
|
|
153
153
|
processTileModel(e) {
|
|
154
154
|
e.traverse((t) => {
|
|
155
|
-
t.material && (t.material = new
|
|
155
|
+
t.material && (t.material = new Ce());
|
|
156
156
|
});
|
|
157
157
|
}
|
|
158
158
|
/**
|
|
@@ -184,8 +184,8 @@ class Xe {
|
|
|
184
184
|
e.needsUpdate = !0;
|
|
185
185
|
}
|
|
186
186
|
}
|
|
187
|
-
var u = /* @__PURE__ */ ((s) => (s.GEOJSON = "geojson", s.CESIUM_ION = "cesiumIon", s.TMS = "tms", s.XYZ = "xyz", s.WMS = "wms", s.WMTS = "wmts", s.URL_TEMPLATE = "urlTemplate", s.PLOT = "plot", s))(u || {}),
|
|
188
|
-
class
|
|
187
|
+
var u = /* @__PURE__ */ ((s) => (s.GEOJSON = "geojson", s.CESIUM_ION = "cesiumIon", s.TMS = "tms", s.XYZ = "xyz", s.WMS = "wms", s.WMTS = "wmts", s.URL_TEMPLATE = "urlTemplate", s.PLOT = "plot", s))(u || {}), x = /* @__PURE__ */ ((s) => (s.QUANTIZED_MESH = "quantizedMesh", s.CESIUM_ION = "cesiumIon", s))(x || {});
|
|
188
|
+
class B {
|
|
189
189
|
constructor(e, t) {
|
|
190
190
|
this.imageOverlayPlugin = e, this.resourceManager = t;
|
|
191
191
|
}
|
|
@@ -210,7 +210,7 @@ class G {
|
|
|
210
210
|
...this._getGeoJSONModeFlags(r)
|
|
211
211
|
};
|
|
212
212
|
e.color !== void 0 && (i.color = new W(e.color));
|
|
213
|
-
const n = new
|
|
213
|
+
const n = new de(i);
|
|
214
214
|
return t.addOverlay(n, e.order), this._instances.set(e.id, {
|
|
215
215
|
id: e.id,
|
|
216
216
|
type: e.type,
|
|
@@ -328,7 +328,7 @@ class G {
|
|
|
328
328
|
addCesiumIonOverlay(e) {
|
|
329
329
|
const t = this._getImageOverlayPluginForAdd(e.id);
|
|
330
330
|
if (!t) return null;
|
|
331
|
-
const r = new
|
|
331
|
+
const r = new We({
|
|
332
332
|
assetId: e.assetId,
|
|
333
333
|
apiToken: e.apiToken,
|
|
334
334
|
autoRefreshToken: e.autoRefreshToken ?? !0,
|
|
@@ -350,7 +350,7 @@ class G {
|
|
|
350
350
|
addTMSOverlay(e) {
|
|
351
351
|
const t = this._getImageOverlayPluginForAdd(e.id);
|
|
352
352
|
if (!t) return null;
|
|
353
|
-
const r = new
|
|
353
|
+
const r = new ze({
|
|
354
354
|
url: e.url,
|
|
355
355
|
color: typeof e.color == "number" ? e.color : 16777215,
|
|
356
356
|
opacity: e.opacity ?? 1
|
|
@@ -370,7 +370,7 @@ class G {
|
|
|
370
370
|
addXYZOverlay(e) {
|
|
371
371
|
const t = this._getImageOverlayPluginForAdd(e.id);
|
|
372
372
|
if (!t) return null;
|
|
373
|
-
const r = new
|
|
373
|
+
const r = new Te({
|
|
374
374
|
url: e.url,
|
|
375
375
|
color: typeof e.color == "number" ? e.color : 16777215,
|
|
376
376
|
opacity: e.opacity ?? 1
|
|
@@ -421,7 +421,7 @@ class G {
|
|
|
421
421
|
addUrlTemplateOverlay(e) {
|
|
422
422
|
const t = this._getImageOverlayPluginForAdd(e.id);
|
|
423
423
|
if (!t) return null;
|
|
424
|
-
const r = new
|
|
424
|
+
const r = new Je({
|
|
425
425
|
url: e.url,
|
|
426
426
|
subdomains: e.subdomains,
|
|
427
427
|
levels: e.levels,
|
|
@@ -453,7 +453,7 @@ class G {
|
|
|
453
453
|
crs: e.crs || "EPSG:4326",
|
|
454
454
|
format: e.format || "image/png",
|
|
455
455
|
tileDimension: e.tileDimension || 256
|
|
456
|
-
}, i = new
|
|
456
|
+
}, i = new $e({
|
|
457
457
|
url: e.url,
|
|
458
458
|
layer: r.layer,
|
|
459
459
|
crs: r.crs,
|
|
@@ -478,12 +478,12 @@ class G {
|
|
|
478
478
|
async addWMTSOverlay(e) {
|
|
479
479
|
const t = this._getImageOverlayPluginForAdd(e.id);
|
|
480
480
|
if (!t) return null;
|
|
481
|
-
const r = await new
|
|
481
|
+
const r = await new je().loadAsync(e.url), i = ["EPSG:4326", "EPSG:3857"];
|
|
482
482
|
let n = e.layer || "";
|
|
483
483
|
r.layers.find((l) => l.identifier === n) || (n = r.layers.find(
|
|
484
484
|
(l) => l?.tileMatrixSets?.some((h) => i.includes(h.supportedCRS))
|
|
485
485
|
)?.identifier || r.layers[0].identifier);
|
|
486
|
-
const o = new
|
|
486
|
+
const o = new He({
|
|
487
487
|
capabilities: r,
|
|
488
488
|
layer: n,
|
|
489
489
|
dimensions: e.dimensions || null,
|
|
@@ -668,7 +668,7 @@ class G {
|
|
|
668
668
|
};
|
|
669
669
|
}
|
|
670
670
|
_getGeoJSONUtilityOverlay() {
|
|
671
|
-
return this._geoJSONUtilityOverlay || (this._geoJSONUtilityOverlay = new
|
|
671
|
+
return this._geoJSONUtilityOverlay || (this._geoJSONUtilityOverlay = new de({})), this._geoJSONUtilityOverlay;
|
|
672
672
|
}
|
|
673
673
|
_updateOverlayOptions(e, t) {
|
|
674
674
|
const r = this._instances.get(e);
|
|
@@ -678,7 +678,7 @@ class G {
|
|
|
678
678
|
}), this.resourceManager?.updateOverlay(e, t);
|
|
679
679
|
}
|
|
680
680
|
_getImageOverlayPluginForAdd(e) {
|
|
681
|
-
return this.imageOverlayPlugin ? this._instances.has(e) ? (console.warn(`OverlayManager: Overlay "${e}" already exists`), null) : this._instances.size >=
|
|
681
|
+
return this.imageOverlayPlugin ? this._instances.has(e) ? (console.warn(`OverlayManager: Overlay "${e}" already exists`), null) : this._instances.size >= B.MAX_OVERLAY_INSTANCES ? (console.error(`OverlayManager: Cannot add overlay "${e}" because the maximum number of overlays is ${B.MAX_OVERLAY_INSTANCES}`), null) : this.imageOverlayPlugin : null;
|
|
682
682
|
}
|
|
683
683
|
/**
|
|
684
684
|
* 获取本地影像数量(不依赖 ResourceManager)
|
|
@@ -704,7 +704,7 @@ class G {
|
|
|
704
704
|
this.disposeInstances(), this.resourceManager?.clear();
|
|
705
705
|
}
|
|
706
706
|
}
|
|
707
|
-
class
|
|
707
|
+
class tt {
|
|
708
708
|
/** Overlay 资源配置 */
|
|
709
709
|
_overlays = /* @__PURE__ */ new Map();
|
|
710
710
|
// =============== Overlay 资源管理 ===============
|
|
@@ -794,7 +794,7 @@ class Ve {
|
|
|
794
794
|
e.overlays && (this._overlays.clear(), e.overlays.forEach((t) => this._overlays.set(t.id, { ...t })));
|
|
795
795
|
}
|
|
796
796
|
}
|
|
797
|
-
class
|
|
797
|
+
class rt {
|
|
798
798
|
/** 地形配置映射表 */
|
|
799
799
|
_terrains = /* @__PURE__ */ new Map();
|
|
800
800
|
/** 当前激活的地形 ID */
|
|
@@ -883,10 +883,7 @@ class qe {
|
|
|
883
883
|
this.clear();
|
|
884
884
|
}
|
|
885
885
|
}
|
|
886
|
-
|
|
887
|
-
class b {
|
|
888
|
-
/** 自增字符串 id('1' / '2' / '3' ...) */
|
|
889
|
-
id;
|
|
886
|
+
class C extends Le {
|
|
890
887
|
/**
|
|
891
888
|
* 类别。基类构造为空串,子类用 `readonly category = 'xxx' as const` 覆写。
|
|
892
889
|
* 桥接器据此 switch 分支。
|
|
@@ -897,17 +894,48 @@ class b {
|
|
|
897
894
|
* 收窄类型提示。
|
|
898
895
|
*/
|
|
899
896
|
options;
|
|
897
|
+
/** 当前几何对应的场景包围盒缓存。 */
|
|
898
|
+
boundingBox = null;
|
|
899
|
+
/** 当前几何对应的场景包围球缓存。 */
|
|
900
|
+
boundingSphere = null;
|
|
901
|
+
/** 缓存对应的 options 快照键,兼容业务侧对 points 的就地修改。 */
|
|
902
|
+
_boundingBoxCacheKey = "";
|
|
903
|
+
/** 由掌握地形坐标变换的 TerrainTilesRenderer 注入。 */
|
|
904
|
+
_boundingBoxResolver = null;
|
|
900
905
|
constructor(e) {
|
|
901
|
-
|
|
902
|
-
|
|
906
|
+
const { rotation: t, ...r } = e;
|
|
907
|
+
super(r), this.category = "", this.options = { ...e }, this.options.points && (this.options.points = this.options.points.map(
|
|
908
|
+
(i) => [i[0], i[1]]
|
|
903
909
|
));
|
|
904
910
|
}
|
|
911
|
+
/**
|
|
912
|
+
* 注入场景包围盒计算器。模型自身只有经纬度,不负责猜测地形坐标变换。
|
|
913
|
+
*/
|
|
914
|
+
setBoundingBoxResolver(e) {
|
|
915
|
+
this._boundingBoxResolver = e, this.invalidateBoundingBox();
|
|
916
|
+
}
|
|
917
|
+
/** 清除包围盒缓存;地形重定向或数据改变后调用。 */
|
|
918
|
+
invalidateBoundingBox() {
|
|
919
|
+
this.boundingBox = null, this.boundingSphere = null, this._boundingBoxCacheKey = "";
|
|
920
|
+
}
|
|
921
|
+
/** 按 Three.js Object3D 包围盒协议更新 boundingBox。 */
|
|
922
|
+
computeBoundingBox() {
|
|
923
|
+
const e = JSON.stringify(this.options);
|
|
924
|
+
if (this.boundingBox && this._boundingBoxCacheKey === e)
|
|
925
|
+
return;
|
|
926
|
+
const t = this._boundingBoxResolver?.(this);
|
|
927
|
+
this.boundingBox = t?.clone() ?? new te(), this.boundingSphere = null, this._boundingBoxCacheKey = e;
|
|
928
|
+
}
|
|
929
|
+
/** 按 Three.js Object3D 包围体协议更新 boundingSphere。 */
|
|
930
|
+
computeBoundingSphere() {
|
|
931
|
+
this.computeBoundingBox(), !this.boundingSphere && (this.boundingSphere = this.boundingBox?.getBoundingSphere(new G()) ?? new G());
|
|
932
|
+
}
|
|
905
933
|
/**
|
|
906
934
|
* 不可变整表替换:用展开 + patch 重建 options。
|
|
907
935
|
* 子类覆写此方法仅为收窄 patch 的类型提示,方法体相同。
|
|
908
936
|
*/
|
|
909
937
|
update(e) {
|
|
910
|
-
this.options = { ...this.options, ...e };
|
|
938
|
+
this.options = { ...this.options, ...e }, this.invalidateBoundingBox();
|
|
911
939
|
}
|
|
912
940
|
/**
|
|
913
941
|
* 浅快照:options 是新对象(展开一层),但 options.points 与内部共享引用。
|
|
@@ -945,7 +973,7 @@ class b {
|
|
|
945
973
|
return this.options.points || [];
|
|
946
974
|
}
|
|
947
975
|
}
|
|
948
|
-
class
|
|
976
|
+
class it extends C {
|
|
949
977
|
category = "point";
|
|
950
978
|
constructor(e) {
|
|
951
979
|
super(e);
|
|
@@ -964,7 +992,7 @@ class Ke extends b {
|
|
|
964
992
|
return this.getCenterPoints();
|
|
965
993
|
}
|
|
966
994
|
}
|
|
967
|
-
class
|
|
995
|
+
class st extends C {
|
|
968
996
|
category = "line";
|
|
969
997
|
constructor(e) {
|
|
970
998
|
super(e);
|
|
@@ -974,7 +1002,7 @@ class et extends b {
|
|
|
974
1002
|
this.options = { ...this.options, ...e };
|
|
975
1003
|
}
|
|
976
1004
|
}
|
|
977
|
-
class
|
|
1005
|
+
class nt extends C {
|
|
978
1006
|
category = "polygon";
|
|
979
1007
|
constructor(e) {
|
|
980
1008
|
super(e);
|
|
@@ -984,7 +1012,7 @@ class tt extends b {
|
|
|
984
1012
|
this.options = { ...this.options, ...e };
|
|
985
1013
|
}
|
|
986
1014
|
}
|
|
987
|
-
class
|
|
1015
|
+
class ot extends C {
|
|
988
1016
|
category = "rectangle";
|
|
989
1017
|
constructor(e) {
|
|
990
1018
|
super(e);
|
|
@@ -994,8 +1022,8 @@ class rt extends b {
|
|
|
994
1022
|
this.options = { ...this.options, ...e };
|
|
995
1023
|
}
|
|
996
1024
|
}
|
|
997
|
-
const
|
|
998
|
-
class
|
|
1025
|
+
const at = p.DEG2RAD, pe = 111320;
|
|
1026
|
+
class lt extends C {
|
|
999
1027
|
category = "sector";
|
|
1000
1028
|
constructor(e) {
|
|
1001
1029
|
super(e);
|
|
@@ -1008,14 +1036,14 @@ class st extends b {
|
|
|
1008
1036
|
getExtentPoints() {
|
|
1009
1037
|
const e = this.options.points;
|
|
1010
1038
|
if (!e || e.length === 0) return [];
|
|
1011
|
-
const t = e[0][0], r = e[0][1], i = this.options.radius || 0, n = i / (
|
|
1039
|
+
const t = e[0][0], r = e[0][1], i = this.options.radius || 0, n = i / (pe * Math.cos(r * at)), o = i / pe;
|
|
1012
1040
|
return [
|
|
1013
1041
|
[t - n, r - o],
|
|
1014
1042
|
[t + n, r + o]
|
|
1015
1043
|
];
|
|
1016
1044
|
}
|
|
1017
1045
|
}
|
|
1018
|
-
class
|
|
1046
|
+
class ct extends C {
|
|
1019
1047
|
category = "arrow";
|
|
1020
1048
|
/** generateCoords() 填充的闭合多边形顶点;初始为空 */
|
|
1021
1049
|
generatedCoords = [];
|
|
@@ -1043,22 +1071,22 @@ class nt extends b {
|
|
|
1043
1071
|
return this.generatedCoords = [], this.generatedCoords;
|
|
1044
1072
|
switch (this.options.arrowType) {
|
|
1045
1073
|
case "fine":
|
|
1046
|
-
this.generatedCoords =
|
|
1074
|
+
this.generatedCoords = Y(e[0], e[1]);
|
|
1047
1075
|
break;
|
|
1048
1076
|
case "assaultDirection":
|
|
1049
|
-
this.generatedCoords =
|
|
1077
|
+
this.generatedCoords = Ne(e[0], e[1]);
|
|
1050
1078
|
break;
|
|
1051
1079
|
case "attack":
|
|
1052
|
-
this.generatedCoords =
|
|
1080
|
+
this.generatedCoords = Re(e);
|
|
1053
1081
|
break;
|
|
1054
1082
|
case "swallowtailAttack":
|
|
1055
|
-
this.generatedCoords =
|
|
1083
|
+
this.generatedCoords = Ie(e);
|
|
1056
1084
|
break;
|
|
1057
1085
|
case "curved":
|
|
1058
|
-
this.generatedCoords =
|
|
1086
|
+
this.generatedCoords = Ee(e);
|
|
1059
1087
|
break;
|
|
1060
1088
|
default:
|
|
1061
|
-
this.generatedCoords =
|
|
1089
|
+
this.generatedCoords = Y(e[0], e[e.length - 1]);
|
|
1062
1090
|
break;
|
|
1063
1091
|
}
|
|
1064
1092
|
return this.generatedCoords;
|
|
@@ -1085,7 +1113,7 @@ class nt extends b {
|
|
|
1085
1113
|
};
|
|
1086
1114
|
}
|
|
1087
1115
|
}
|
|
1088
|
-
class
|
|
1116
|
+
class ht extends C {
|
|
1089
1117
|
category = "text";
|
|
1090
1118
|
constructor(e) {
|
|
1091
1119
|
super(e);
|
|
@@ -1104,8 +1132,8 @@ class ot extends b {
|
|
|
1104
1132
|
return this.getCenterPoints();
|
|
1105
1133
|
}
|
|
1106
1134
|
}
|
|
1107
|
-
const
|
|
1108
|
-
class
|
|
1135
|
+
const dt = p.DEG2RAD, fe = 111320;
|
|
1136
|
+
class ut extends C {
|
|
1109
1137
|
category = "circle";
|
|
1110
1138
|
constructor(e) {
|
|
1111
1139
|
super(e);
|
|
@@ -1118,19 +1146,19 @@ class lt extends b {
|
|
|
1118
1146
|
getExtentPoints() {
|
|
1119
1147
|
const e = this.options.points;
|
|
1120
1148
|
if (!e || e.length === 0) return [];
|
|
1121
|
-
const t = e[0][0], r = e[0][1], i = this.options.radius || 0, n = i / (
|
|
1149
|
+
const t = e[0][0], r = e[0][1], i = this.options.radius || 0, n = i / (fe * Math.cos(r * dt)), o = i / fe;
|
|
1122
1150
|
return [
|
|
1123
1151
|
[t - n, r - o],
|
|
1124
1152
|
[t + n, r + o]
|
|
1125
1153
|
];
|
|
1126
1154
|
}
|
|
1127
1155
|
}
|
|
1128
|
-
const
|
|
1129
|
-
function
|
|
1156
|
+
const gt = 3, pt = 1e3;
|
|
1157
|
+
function ft(s) {
|
|
1130
1158
|
return Number.isFinite(s) ? Math.max(Math.round(s), 0) : 0;
|
|
1131
1159
|
}
|
|
1132
|
-
function
|
|
1133
|
-
const e =
|
|
1160
|
+
function yt(s) {
|
|
1161
|
+
const e = ft(s), t = pt + e * gt;
|
|
1134
1162
|
if (!Number.isSafeInteger(t))
|
|
1135
1163
|
throw new Error("Plot renderOrder exceeded JavaScript safe integer range.");
|
|
1136
1164
|
return t;
|
|
@@ -1167,7 +1195,7 @@ new a();
|
|
|
1167
1195
|
new a();
|
|
1168
1196
|
new a();
|
|
1169
1197
|
new a();
|
|
1170
|
-
new
|
|
1198
|
+
new xe();
|
|
1171
1199
|
new Array(9);
|
|
1172
1200
|
new a();
|
|
1173
1201
|
new a();
|
|
@@ -1189,7 +1217,7 @@ new g();
|
|
|
1189
1217
|
new a();
|
|
1190
1218
|
new a();
|
|
1191
1219
|
new a();
|
|
1192
|
-
new
|
|
1220
|
+
new Ge();
|
|
1193
1221
|
new a();
|
|
1194
1222
|
new a();
|
|
1195
1223
|
new a();
|
|
@@ -1217,7 +1245,7 @@ new a();
|
|
|
1217
1245
|
new a();
|
|
1218
1246
|
new a();
|
|
1219
1247
|
new a();
|
|
1220
|
-
new
|
|
1248
|
+
new xe();
|
|
1221
1249
|
new a();
|
|
1222
1250
|
new a();
|
|
1223
1251
|
new a();
|
|
@@ -1310,16 +1338,16 @@ new a();
|
|
|
1310
1338
|
new a();
|
|
1311
1339
|
new a();
|
|
1312
1340
|
new a();
|
|
1313
|
-
class
|
|
1341
|
+
class b {
|
|
1314
1342
|
constructor(e, t) {
|
|
1315
1343
|
this.next = null, this.key = e, this.data = t, this.left = null, this.right = null;
|
|
1316
1344
|
}
|
|
1317
1345
|
}
|
|
1318
|
-
function
|
|
1346
|
+
function mt(s, e) {
|
|
1319
1347
|
return s > e ? 1 : s < e ? -1 : 0;
|
|
1320
1348
|
}
|
|
1321
1349
|
function O(s, e, t) {
|
|
1322
|
-
const r = new
|
|
1350
|
+
const r = new b(null, null);
|
|
1323
1351
|
let i = r, n = r;
|
|
1324
1352
|
for (; ; ) {
|
|
1325
1353
|
const o = t(s, e.key);
|
|
@@ -1341,15 +1369,15 @@ function O(s, e, t) {
|
|
|
1341
1369
|
}
|
|
1342
1370
|
return i.right = e.left, n.left = e.right, e.left = r.right, e.right = r.left, e;
|
|
1343
1371
|
}
|
|
1344
|
-
function
|
|
1345
|
-
const i = new
|
|
1372
|
+
function z(s, e, t, r) {
|
|
1373
|
+
const i = new b(s, e);
|
|
1346
1374
|
if (t === null)
|
|
1347
1375
|
return i.left = i.right = null, i;
|
|
1348
1376
|
t = O(s, t, r);
|
|
1349
1377
|
const n = r(s, t.key);
|
|
1350
1378
|
return n < 0 ? (i.left = t.left, i.right = t, t.left = null) : n >= 0 && (i.right = t.right, i.left = t, t.right = null), i;
|
|
1351
1379
|
}
|
|
1352
|
-
function
|
|
1380
|
+
function ye(s, e, t) {
|
|
1353
1381
|
let r = null, i = null;
|
|
1354
1382
|
if (e) {
|
|
1355
1383
|
e = O(s, e, t);
|
|
@@ -1358,32 +1386,32 @@ function pe(s, e, t) {
|
|
|
1358
1386
|
}
|
|
1359
1387
|
return { left: r, right: i };
|
|
1360
1388
|
}
|
|
1361
|
-
function
|
|
1389
|
+
function vt(s, e, t) {
|
|
1362
1390
|
return e === null ? s : (s === null || (e = O(s.key, e, t), e.left = s), e);
|
|
1363
1391
|
}
|
|
1364
|
-
function
|
|
1392
|
+
function X(s, e, t, r, i) {
|
|
1365
1393
|
if (s) {
|
|
1366
1394
|
r(`${e}${t ? "└── " : "├── "}${i(s)}
|
|
1367
1395
|
`);
|
|
1368
1396
|
const n = e + (t ? " " : "│ ");
|
|
1369
|
-
s.left &&
|
|
1397
|
+
s.left && X(s.left, n, !1, r, i), s.right && X(s.right, n, !0, r, i);
|
|
1370
1398
|
}
|
|
1371
1399
|
}
|
|
1372
|
-
class
|
|
1373
|
-
constructor(e =
|
|
1400
|
+
class wt {
|
|
1401
|
+
constructor(e = mt) {
|
|
1374
1402
|
this._root = null, this._size = 0, this._comparator = e;
|
|
1375
1403
|
}
|
|
1376
1404
|
/**
|
|
1377
1405
|
* Inserts a key, allows duplicates
|
|
1378
1406
|
*/
|
|
1379
1407
|
insert(e, t) {
|
|
1380
|
-
return this._size++, this._root =
|
|
1408
|
+
return this._size++, this._root = z(e, t, this._root, this._comparator);
|
|
1381
1409
|
}
|
|
1382
1410
|
/**
|
|
1383
1411
|
* Adds a key, if it is not present in the tree
|
|
1384
1412
|
*/
|
|
1385
1413
|
add(e, t) {
|
|
1386
|
-
const r = new
|
|
1414
|
+
const r = new b(e, t);
|
|
1387
1415
|
this._root === null && (r.left = r.right = null, this._size++, this._root = r);
|
|
1388
1416
|
const i = this._comparator, n = O(e, this._root, i), o = i(e, n.key);
|
|
1389
1417
|
return o === 0 ? this._root = n : (o < 0 ? (r.left = n.left, r.right = n, n.left = null) : o > 0 && (r.right = n.right, r.left = n, n.right = null), this._size++, this._root = r), this._root;
|
|
@@ -1544,7 +1572,7 @@ class ft {
|
|
|
1544
1572
|
return this._root = null, this._size = 0, this;
|
|
1545
1573
|
}
|
|
1546
1574
|
toList() {
|
|
1547
|
-
return
|
|
1575
|
+
return Mt(this._root);
|
|
1548
1576
|
}
|
|
1549
1577
|
/**
|
|
1550
1578
|
* Bulk-load items. Both array have to be same size
|
|
@@ -1552,15 +1580,15 @@ class ft {
|
|
|
1552
1580
|
load(e, t = [], r = !1) {
|
|
1553
1581
|
let i = e.length;
|
|
1554
1582
|
const n = this._comparator;
|
|
1555
|
-
if (r &&
|
|
1556
|
-
this._root =
|
|
1583
|
+
if (r && Z(e, t, 0, i - 1, n), this._root === null)
|
|
1584
|
+
this._root = V(e, t, 0, i), this._size = i;
|
|
1557
1585
|
else {
|
|
1558
|
-
const o =
|
|
1586
|
+
const o = Ot(
|
|
1559
1587
|
this.toList(),
|
|
1560
|
-
|
|
1588
|
+
_t(e, t),
|
|
1561
1589
|
n
|
|
1562
1590
|
);
|
|
1563
|
-
i = this._size + i, this._root =
|
|
1591
|
+
i = this._size + i, this._root = q({ head: o }, 0, i);
|
|
1564
1592
|
}
|
|
1565
1593
|
return this;
|
|
1566
1594
|
}
|
|
@@ -1575,15 +1603,15 @@ class ft {
|
|
|
1575
1603
|
}
|
|
1576
1604
|
toString(e = (t) => String(t.key)) {
|
|
1577
1605
|
const t = [];
|
|
1578
|
-
return
|
|
1606
|
+
return X(this._root, "", !0, (r) => t.push(r), e), t.join("");
|
|
1579
1607
|
}
|
|
1580
1608
|
update(e, t, r) {
|
|
1581
1609
|
const i = this._comparator;
|
|
1582
|
-
let { left: n, right: o } =
|
|
1583
|
-
i(e, t) < 0 ? o =
|
|
1610
|
+
let { left: n, right: o } = ye(e, this._root, i);
|
|
1611
|
+
i(e, t) < 0 ? o = z(t, r, o, i) : n = z(t, r, n, i), this._root = vt(n, o, i);
|
|
1584
1612
|
}
|
|
1585
1613
|
split(e) {
|
|
1586
|
-
return
|
|
1614
|
+
return ye(e, this._root, this._comparator);
|
|
1587
1615
|
}
|
|
1588
1616
|
*[Symbol.iterator]() {
|
|
1589
1617
|
let e = this._root;
|
|
@@ -1593,47 +1621,47 @@ class ft {
|
|
|
1593
1621
|
e !== null ? (t.push(e), e = e.left) : t.length !== 0 ? (e = t.pop(), yield e, e = e.right) : r = !0;
|
|
1594
1622
|
}
|
|
1595
1623
|
}
|
|
1596
|
-
function
|
|
1624
|
+
function V(s, e, t, r) {
|
|
1597
1625
|
const i = r - t;
|
|
1598
1626
|
if (i > 0) {
|
|
1599
|
-
const n = t + Math.floor(i / 2), o = s[n], l = e[n], h = new
|
|
1600
|
-
return h.left =
|
|
1627
|
+
const n = t + Math.floor(i / 2), o = s[n], l = e[n], h = new b(o, l);
|
|
1628
|
+
return h.left = V(s, e, t, n), h.right = V(s, e, n + 1, r), h;
|
|
1601
1629
|
}
|
|
1602
1630
|
return null;
|
|
1603
1631
|
}
|
|
1604
|
-
function
|
|
1605
|
-
const t = new
|
|
1632
|
+
function _t(s, e) {
|
|
1633
|
+
const t = new b(null, null);
|
|
1606
1634
|
let r = t;
|
|
1607
1635
|
for (let i = 0; i < s.length; i++)
|
|
1608
|
-
r = r.next = new
|
|
1636
|
+
r = r.next = new b(s[i], e[i]);
|
|
1609
1637
|
return r.next = null, t.next;
|
|
1610
1638
|
}
|
|
1611
|
-
function
|
|
1639
|
+
function Mt(s) {
|
|
1612
1640
|
let e = s;
|
|
1613
1641
|
const t = [];
|
|
1614
1642
|
let r = !1;
|
|
1615
|
-
const i = new
|
|
1643
|
+
const i = new b(null, null);
|
|
1616
1644
|
let n = i;
|
|
1617
1645
|
for (; !r; )
|
|
1618
1646
|
e ? (t.push(e), e = e.left) : t.length > 0 ? (e = n = n.next = t.pop(), e = e.right) : r = !0;
|
|
1619
1647
|
return n.next = null, i.next;
|
|
1620
1648
|
}
|
|
1621
|
-
function
|
|
1649
|
+
function q(s, e, t) {
|
|
1622
1650
|
const r = t - e;
|
|
1623
1651
|
if (r > 0) {
|
|
1624
|
-
const i = e + Math.floor(r / 2), n =
|
|
1625
|
-
return o.left = n, s.head = s.head.next, o.right =
|
|
1652
|
+
const i = e + Math.floor(r / 2), n = q(s, e, i), o = s.head;
|
|
1653
|
+
return o.left = n, s.head = s.head.next, o.right = q(s, i + 1, t), o;
|
|
1626
1654
|
}
|
|
1627
1655
|
return null;
|
|
1628
1656
|
}
|
|
1629
|
-
function
|
|
1630
|
-
const r = new
|
|
1657
|
+
function Ot(s, e, t) {
|
|
1658
|
+
const r = new b(null, null);
|
|
1631
1659
|
let i = r, n = s, o = e;
|
|
1632
1660
|
for (; n !== null && o !== null; )
|
|
1633
1661
|
t(n.key, o.key) < 0 ? (i.next = n, n = n.next) : (i.next = o, o = o.next), i = i.next;
|
|
1634
1662
|
return n !== null ? i.next = n : o !== null && (i.next = o), r.next;
|
|
1635
1663
|
}
|
|
1636
|
-
function
|
|
1664
|
+
function Z(s, e, t, r, i) {
|
|
1637
1665
|
if (t >= r) return;
|
|
1638
1666
|
const n = s[t + r >> 1];
|
|
1639
1667
|
let o = t - 1, l = r + 1;
|
|
@@ -1648,22 +1676,22 @@ function q(s, e, t, r, i) {
|
|
|
1648
1676
|
let h = s[o];
|
|
1649
1677
|
s[o] = s[l], s[l] = h, h = e[o], e[o] = e[l], e[l] = h;
|
|
1650
1678
|
}
|
|
1651
|
-
|
|
1679
|
+
Z(s, e, t, l, i), Z(s, e, l + 1, r, i);
|
|
1652
1680
|
}
|
|
1653
1681
|
let S = Number.EPSILON;
|
|
1654
1682
|
S === void 0 && (S = Math.pow(2, -52));
|
|
1655
|
-
const
|
|
1683
|
+
const St = S * S, me = (s, e) => {
|
|
1656
1684
|
if (-S < s && s < S && -S < e && e < S)
|
|
1657
1685
|
return 0;
|
|
1658
1686
|
const t = s - e;
|
|
1659
|
-
return t * t <
|
|
1687
|
+
return t * t < St * s * e ? 0 : s < e ? -1 : 1;
|
|
1660
1688
|
};
|
|
1661
|
-
class
|
|
1689
|
+
class bt {
|
|
1662
1690
|
constructor() {
|
|
1663
1691
|
this.reset();
|
|
1664
1692
|
}
|
|
1665
1693
|
reset() {
|
|
1666
|
-
this.xRounder = new
|
|
1694
|
+
this.xRounder = new ve(), this.yRounder = new ve();
|
|
1667
1695
|
}
|
|
1668
1696
|
round(e, t) {
|
|
1669
1697
|
return {
|
|
@@ -1672,9 +1700,9 @@ class _t {
|
|
|
1672
1700
|
};
|
|
1673
1701
|
}
|
|
1674
1702
|
}
|
|
1675
|
-
class
|
|
1703
|
+
class ve {
|
|
1676
1704
|
constructor() {
|
|
1677
|
-
this.tree = new
|
|
1705
|
+
this.tree = new wt(), this.round(0);
|
|
1678
1706
|
}
|
|
1679
1707
|
// Note: this can rounds input values backwards or forwards.
|
|
1680
1708
|
// You might ask, why not restrict this to just rounding
|
|
@@ -1685,47 +1713,47 @@ class ye {
|
|
|
1685
1713
|
// angle for t-intersections).
|
|
1686
1714
|
round(e) {
|
|
1687
1715
|
const t = this.tree.add(e), r = this.tree.prev(t);
|
|
1688
|
-
if (r !== null &&
|
|
1716
|
+
if (r !== null && me(t.key, r.key) === 0)
|
|
1689
1717
|
return this.tree.remove(e), r.key;
|
|
1690
1718
|
const i = this.tree.next(t);
|
|
1691
|
-
return i !== null &&
|
|
1719
|
+
return i !== null && me(t.key, i.key) === 0 ? (this.tree.remove(e), i.key) : e;
|
|
1692
1720
|
}
|
|
1693
1721
|
}
|
|
1694
|
-
new
|
|
1722
|
+
new bt();
|
|
1695
1723
|
typeof process < "u" && process.env.POLYGON_CLIPPING_MAX_QUEUE_SIZE;
|
|
1696
1724
|
typeof process < "u" && process.env.POLYGON_CLIPPING_MAX_SWEEPLINE_SEGMENTS;
|
|
1697
1725
|
p.DEG2RAD;
|
|
1698
1726
|
p.DEG2RAD;
|
|
1699
|
-
const Mt = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='128'%20height='128'%20viewBox='0%200%20128%20128'%20role='img'%20aria-labelledby='title%20desc'%3e%3ctitle%20id='title'%3e联动单位%3c/title%3e%3cdesc%20id='desc'%3eGIS%20点位图标;类别:联动;样式:classified%3c/desc%3e%3cdefs%3e%3csymbol%20id='icon-linkage'%20viewBox='0%200%20100%20100'%3e%3cg%20stroke='currentColor'%20stroke-width='6'%20stroke-linecap='round'%20fill='none'%3e%3cpath%20d='M50%2050L22%2024M50%2050l28-26M50%2050L20%2076M50%2050l30%2026'/%3e%3ccircle%20cx='50'%20cy='50'%20r='13'%20fill='currentColor'/%3e%3ccircle%20cx='22'%20cy='24'%20r='10'/%3e%3ccircle%20cx='78'%20cy='24'%20r='10'/%3e%3ccircle%20cx='20'%20cy='76'%20r='10'/%3e%3ccircle%20cx='80'%20cy='76'%20r='10'/%3e%3c/g%3e%3cpath%20d='M44%2050l4%204%209-10'%20fill='none'%20stroke='%23F8FAFC'%20stroke-width='5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/symbol%3e%3c/defs%3e%3cg%20color='%23B67CFF'%3e%3cuse%20href='%23icon-linkage'%20x='16'%20y='16'%20width='96'%20height='96'/%3e%3c/g%3e%3c/svg%3e", Ot = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='128'%20height='128'%20viewBox='0%200%20128%20128'%20role='img'%20aria-labelledby='title%20desc'%3e%3ctitle%20id='title'%3e保障物资点%3c/title%3e%3cdesc%20id='desc'%3eGIS%20点位图标;类别:物资;样式:classified%3c/desc%3e%3cdefs%3e%3csymbol%20id='icon-supplies'%20viewBox='0%200%20100%20100'%3e%3cg%20stroke='currentColor'%20stroke-width='6'%20stroke-linejoin='round'%20fill='none'%3e%3cpath%20d='M18%2035l32-16%2032%2016v44L50%2092%2018%2079zM18%2035l32%2017%2032-17M50%2052v40'/%3e%3cpath%20d='M34%2027l32%2017'/%3e%3c/g%3e%3cpath%20d='M41%2058h18v8h-18zM46%2053h8v18h-8z'%20fill='%23F8FAFC'/%3e%3c/symbol%3e%3c/defs%3e%3cg%20color='%23FFAD33'%3e%3cuse%20href='%23icon-supplies'%20x='16'%20y='16'%20width='96'%20height='96'/%3e%3c/g%3e%3c/svg%3e", St = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='128'%20height='128'%20viewBox='0%200%20128%20128'%20role='img'%20aria-labelledby='title%20desc'%3e%3ctitle%20id='title'%3e消防站%3c/title%3e%3cdesc%20id='desc'%3eGIS%20点位图标;类别:消防站;样式:classified%3c/desc%3e%3cdefs%3e%3csymbol%20id='icon-fire-station'%20viewBox='0%200%20100%20100'%3e%3cg%20stroke='currentColor'%20stroke-width='6'%20stroke-linecap='round'%20stroke-linejoin='round'%20fill='none'%3e%3cpath%20d='M13%2088h74M20%2088V39l30-22%2030%2022v49M31%2088V60h38v28M41%2088V70h18v18'/%3e%3cpath%20d='M20%2041h60'/%3e%3c/g%3e%3cpath%20d='M50%2029c-9%2010-12%2016-9%2022%202%204%205%206%209%206s8-2%2010-6c3-6%200-12-10-22z'%20fill='%23F8FAFC'/%3e%3c/symbol%3e%3c/defs%3e%3cg%20color='%23FF6B2C'%3e%3cuse%20href='%23icon-fire-station'%20x='16'%20y='16'%20width='96'%20height='96'/%3e%3c/g%3e%3c/svg%3e", Ct = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='128'%20height='128'%20viewBox='0%200%20128%20128'%20role='img'%20aria-labelledby='title%20desc'%3e%3ctitle%20id='title'%3e消防水池%3c/title%3e%3cdesc%20id='desc'%3eGIS%20点位图标;类别:水源;样式:classified%3c/desc%3e%3cdefs%3e%3csymbol%20id='icon-fire-pool'%20viewBox='0%200%20100%20100'%3e%3cg%20stroke='currentColor'%20stroke-width='6'%20stroke-linecap='round'%20stroke-linejoin='round'%20fill='none'%3e%3cpath%20d='M16%2039h68v43H16zM25%2055c6-5%2012-5%2018%200s12%205%2018%200%2012-5%2018%200M25%2068c6-5%2012-5%2018%200s12%205%2018%200%2012-5%2018%200'/%3e%3cpath%20d='M67%2021v28M77%2021v28M67%2029h10M67%2039h10'/%3e%3c/g%3e%3cpath%20d='M28%2025h25l-6%207H28z'%20fill='currentColor'/%3e%3c/symbol%3e%3c/defs%3e%3cg%20color='%2338BDF8'%3e%3cuse%20href='%23icon-fire-pool'%20x='16'%20y='16'%20width='96'%20height='96'/%3e%3c/g%3e%3c/svg%3e", bt = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='128'%20height='128'%20viewBox='0%200%20128%20128'%20role='img'%20aria-labelledby='title%20desc'%3e%3ctitle%20id='title'%3e医院资源点%3c/title%3e%3cdesc%20id='desc'%3eGIS%20点位图标;类别:医疗;样式:classified%3c/desc%3e%3cdefs%3e%3csymbol%20id='icon-hospital'%20viewBox='0%200%20100%20100'%3e%3cg%20stroke='currentColor'%20stroke-width='6'%20stroke-linecap='round'%20stroke-linejoin='round'%20fill='none'%3e%3cpath%20d='M18%2087V29h64v58M10%2087h80M29%2087V72h14v15M57%2087V72h14v15'/%3e%3cpath%20d='M50%2038v22M39%2049h22'%20stroke='%23F8FAFC'%20stroke-width='9'/%3e%3c/g%3e%3cpath%20d='M27%2022h46v12H27z'%20fill='currentColor'/%3e%3c/symbol%3e%3c/defs%3e%3cg%20color='%2322D3EE'%3e%3cuse%20href='%23icon-hospital'%20x='16'%20y='16'%20width='96'%20height='96'/%3e%3c/g%3e%3c/svg%3e", kt = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='128'%20height='128'%20viewBox='0%200%20128%20128'%20role='img'%20aria-labelledby='title%20desc'%3e%3ctitle%20id='title'%3e市政消火栓%3c/title%3e%3cdesc%20id='desc'%3eGIS%20点位图标;类别:消防;样式:classified%3c/desc%3e%3cdefs%3e%3csymbol%20id='icon-hydrant-municipal'%20viewBox='0%200%20100%20100'%3e%3cg%20stroke='currentColor'%20stroke-width='6'%20stroke-linecap='round'%20stroke-linejoin='round'%20fill='none'%3e%3cpath%20d='M10%2086h80M18%2086V48h18v38M64%2086V35h20v51M21%2057h4M29%2057h4M21%2068h4M29%2068h4M69%2046h4M77%2046h4M69%2058h4M77%2058h4'%20opacity='0.7'/%3e%3cpath%20d='M42%2086V60h18v26M39%2060h24l-4-11H43zM46%2049v-7h10v7'/%3e%3cpath%20d='M42%2067h-8v12h8M60%2067h8v12h-8'/%3e%3c/g%3e%3ccircle%20cx='51'%20cy='72'%20r='5'%20fill='%23F8FAFC'/%3e%3c/symbol%3e%3c/defs%3e%3cg%20color='%23FF4D3D'%3e%3cuse%20href='%23icon-hydrant-municipal'%20x='16'%20y='16'%20width='96'%20height='96'/%3e%3c/g%3e%3c/svg%3e", xt = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='128'%20height='128'%20viewBox='0%200%20128%20128'%20role='img'%20aria-labelledby='title%20desc'%3e%3ctitle%20id='title'%3e天然水源%3c/title%3e%3cdesc%20id='desc'%3eGIS%20点位图标;类别:水源;样式:classified%3c/desc%3e%3cdefs%3e%3csymbol%20id='icon-natural-water'%20viewBox='0%200%20100%20100'%3e%3cg%20stroke='currentColor'%20stroke-width='6'%20stroke-linecap='round'%20stroke-linejoin='round'%20fill='none'%3e%3cpath%20d='M14%2050l20-24%2014%2016%2011-12%2027%2029'/%3e%3cpath%20d='M15%2064c8-6%2015-6%2023%200s15%206%2023%200%2015-6%2024%200M15%2078c8-6%2015-6%2023%200s15%206%2023%200%2015-6%2024%200'/%3e%3c/g%3e%3ccircle%20cx='72'%20cy='23'%20r='8'%20fill='%23F8FAFC'/%3e%3c/symbol%3e%3c/defs%3e%3cg%20color='%2338BDF8'%3e%3cuse%20href='%23icon-natural-water'%20x='16'%20y='16'%20width='96'%20height='96'/%3e%3c/g%3e%3c/svg%3e", Tt = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='128'%20height='128'%20viewBox='0%200%20128%20128'%20role='img'%20aria-labelledby='title%20desc'%3e%3ctitle%20id='title'%3e室外消火栓(地上式)%3c/title%3e%3cdesc%20id='desc'%3eGIS%20点位图标;类别:消防;样式:classified%3c/desc%3e%3cdefs%3e%3csymbol%20id='icon-hydrant-ground'%20viewBox='0%200%20100%20100'%3e%3cg%20stroke='currentColor'%20stroke-width='7'%20stroke-linecap='round'%20stroke-linejoin='round'%20fill='none'%3e%3cpath%20d='M12%2084h76M38%2084V45h24v39M38%2057H24v16h14M62%2057h14v16H62'/%3e%3cpath%20d='M33%2045h34l-5-16H38zM44%2029v-8h12v8'/%3e%3ccircle%20cx='24'%20cy='65'%20r='5'%20fill='currentColor'/%3e%3ccircle%20cx='76'%20cy='65'%20r='5'%20fill='currentColor'/%3e%3c/g%3e%3cpath%20d='M50%2055l7%2012H43z'%20fill='%23F8FAFC'/%3e%3c/symbol%3e%3c/defs%3e%3cg%20color='%23FF4D3D'%3e%3cuse%20href='%23icon-hydrant-ground'%20x='16'%20y='16'%20width='96'%20height='96'/%3e%3c/g%3e%3c/svg%3e", Pt = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='128'%20height='128'%20viewBox='0%200%20128%20128'%20role='img'%20aria-labelledby='title%20desc'%3e%3ctitle%20id='title'%3e室外消火栓(地下式)%3c/title%3e%3cdesc%20id='desc'%3eGIS%20点位图标;类别:消防;样式:classified%3c/desc%3e%3cdefs%3e%3csymbol%20id='icon-hydrant-underground'%20viewBox='0%200%20100%20100'%3e%3cg%20stroke='currentColor'%20stroke-width='6'%20stroke-linecap='round'%20stroke-linejoin='round'%20fill='none'%3e%3cpath%20d='M12%2040h76'/%3e%3cellipse%20cx='50'%20cy='39'%20rx='22'%20ry='9'%20fill='currentColor'/%3e%3cpath%20d='M35%2045v30h30V45M42%2075v12M58%2075v12M31%2087h38'/%3e%3cpath%20d='M43%2054h14M50%2047v18'%20stroke='%23F8FAFC'/%3e%3c/g%3e%3cpath%20d='M25%2028l-7-8M75%2028l7-8'%20stroke='currentColor'%20stroke-width='5'%20stroke-linecap='round'/%3e%3c/symbol%3e%3c/defs%3e%3cg%20color='%23FF4D3D'%3e%3cuse%20href='%23icon-hydrant-underground'%20x='16'%20y='16'%20width='96'%20height='96'/%3e%3c/g%3e%3c/svg%3e", It = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='128'%20height='128'%20viewBox='0%200%20128%20128'%20role='img'%20aria-labelledby='title%20desc'%3e%3ctitle%20id='title'%3e室外消火栓%3c/title%3e%3cdesc%20id='desc'%3eGIS%20点位图标;类别:消防;样式:classified%3c/desc%3e%3cdefs%3e%3csymbol%20id='icon-hydrant-general'%20viewBox='0%200%20100%20100'%3e%3cg%20stroke='currentColor'%20stroke-width='7'%20stroke-linecap='round'%20stroke-linejoin='round'%20fill='none'%3e%3cpath%20d='M35%2087h30M39%2087V48h22v39M39%2056H25v17h14M61%2056h14v17H61'/%3e%3cpath%20d='M34%2048h32l-5-15H39zM44%2033v-9h12v9'/%3e%3ccircle%20cx='25'%20cy='64'%20r='5'%20fill='currentColor'/%3e%3ccircle%20cx='75'%20cy='64'%20r='5'%20fill='currentColor'/%3e%3c/g%3e%3cpath%20d='M50%2058c-7%209-10%2014-10%2019a10%2010%200%200%200%2020%200c0-5-3-10-10-19z'%20fill='%23F8FAFC'/%3e%3c/symbol%3e%3c/defs%3e%3cg%20color='%23FF4D3D'%3e%3cuse%20href='%23icon-hydrant-general'%20x='16'%20y='16'%20width='96'%20height='96'/%3e%3c/g%3e%3c/svg%3e", Et = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='128'%20height='128'%20viewBox='0%200%20128%20128'%20role='img'%20aria-labelledby='title%20desc'%3e%3ctitle%20id='title'%3e公安资源点%3c/title%3e%3cdesc%20id='desc'%3eGIS%20点位图标;类别:公安;样式:classified%3c/desc%3e%3cdefs%3e%3csymbol%20id='icon-police'%20viewBox='0%200%20100%20100'%3e%3cpath%20d='M50%2014l32%2011v23c0%2021-13%2034-32%2041-19-7-32-20-32-41V25z'%20fill='none'%20stroke='currentColor'%20stroke-width='7'%20stroke-linejoin='round'/%3e%3cpath%20d='M50%2030l5.5%2011.2%2012.4%201.8-9%208.8%202.1%2012.4L50%2058.4l-11%205.8%202.1-12.4-9-8.8%2012.4-1.8z'%20fill='%23F8FAFC'/%3e%3cpath%20d='M35%2073h30'%20stroke='currentColor'%20stroke-width='6'%20stroke-linecap='round'/%3e%3c/symbol%3e%3c/defs%3e%3cg%20color='%235B7CFF'%3e%3cuse%20href='%23icon-police'%20x='16'%20y='16'%20width='96'%20height='96'/%3e%3c/g%3e%3c/svg%3e", Z = {
|
|
1700
|
-
OutdoorFireHydrant:
|
|
1701
|
-
UndergroundHydrant:
|
|
1702
|
-
AboveGroundHydrant:
|
|
1703
|
-
MunicipalFireHydrants:
|
|
1704
|
-
FireWaterReservoir:
|
|
1705
|
-
NaturalWater:
|
|
1706
|
-
HospitalResourcePoint:
|
|
1707
|
-
PublicSecurityResourcePoint:
|
|
1708
|
-
SupportMaterialPoint:
|
|
1709
|
-
FireStation:
|
|
1710
|
-
LinkageUnit:
|
|
1711
|
-
},
|
|
1712
|
-
Object.keys(
|
|
1727
|
+
const Ct = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='128'%20height='128'%20viewBox='0%200%20128%20128'%20role='img'%20aria-labelledby='title%20desc'%3e%3ctitle%20id='title'%3e联动单位%3c/title%3e%3cdesc%20id='desc'%3eGIS%20点位图标;类别:联动;样式:classified%3c/desc%3e%3cdefs%3e%3csymbol%20id='icon-linkage'%20viewBox='0%200%20100%20100'%3e%3cg%20stroke='currentColor'%20stroke-width='6'%20stroke-linecap='round'%20fill='none'%3e%3cpath%20d='M50%2050L22%2024M50%2050l28-26M50%2050L20%2076M50%2050l30%2026'/%3e%3ccircle%20cx='50'%20cy='50'%20r='13'%20fill='currentColor'/%3e%3ccircle%20cx='22'%20cy='24'%20r='10'/%3e%3ccircle%20cx='78'%20cy='24'%20r='10'/%3e%3ccircle%20cx='20'%20cy='76'%20r='10'/%3e%3ccircle%20cx='80'%20cy='76'%20r='10'/%3e%3c/g%3e%3cpath%20d='M44%2050l4%204%209-10'%20fill='none'%20stroke='%23F8FAFC'%20stroke-width='5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/symbol%3e%3c/defs%3e%3cg%20color='%23B67CFF'%3e%3cuse%20href='%23icon-linkage'%20x='16'%20y='16'%20width='96'%20height='96'/%3e%3c/g%3e%3c/svg%3e", xt = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='128'%20height='128'%20viewBox='0%200%20128%20128'%20role='img'%20aria-labelledby='title%20desc'%3e%3ctitle%20id='title'%3e保障物资点%3c/title%3e%3cdesc%20id='desc'%3eGIS%20点位图标;类别:物资;样式:classified%3c/desc%3e%3cdefs%3e%3csymbol%20id='icon-supplies'%20viewBox='0%200%20100%20100'%3e%3cg%20stroke='currentColor'%20stroke-width='6'%20stroke-linejoin='round'%20fill='none'%3e%3cpath%20d='M18%2035l32-16%2032%2016v44L50%2092%2018%2079zM18%2035l32%2017%2032-17M50%2052v40'/%3e%3cpath%20d='M34%2027l32%2017'/%3e%3c/g%3e%3cpath%20d='M41%2058h18v8h-18zM46%2053h8v18h-8z'%20fill='%23F8FAFC'/%3e%3c/symbol%3e%3c/defs%3e%3cg%20color='%23FFAD33'%3e%3cuse%20href='%23icon-supplies'%20x='16'%20y='16'%20width='96'%20height='96'/%3e%3c/g%3e%3c/svg%3e", kt = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='128'%20height='128'%20viewBox='0%200%20128%20128'%20role='img'%20aria-labelledby='title%20desc'%3e%3ctitle%20id='title'%3e消防站%3c/title%3e%3cdesc%20id='desc'%3eGIS%20点位图标;类别:消防站;样式:classified%3c/desc%3e%3cdefs%3e%3csymbol%20id='icon-fire-station'%20viewBox='0%200%20100%20100'%3e%3cg%20stroke='currentColor'%20stroke-width='6'%20stroke-linecap='round'%20stroke-linejoin='round'%20fill='none'%3e%3cpath%20d='M13%2088h74M20%2088V39l30-22%2030%2022v49M31%2088V60h38v28M41%2088V70h18v18'/%3e%3cpath%20d='M20%2041h60'/%3e%3c/g%3e%3cpath%20d='M50%2029c-9%2010-12%2016-9%2022%202%204%205%206%209%206s8-2%2010-6c3-6%200-12-10-22z'%20fill='%23F8FAFC'/%3e%3c/symbol%3e%3c/defs%3e%3cg%20color='%23FF6B2C'%3e%3cuse%20href='%23icon-fire-station'%20x='16'%20y='16'%20width='96'%20height='96'/%3e%3c/g%3e%3c/svg%3e", Tt = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='128'%20height='128'%20viewBox='0%200%20128%20128'%20role='img'%20aria-labelledby='title%20desc'%3e%3ctitle%20id='title'%3e消防水池%3c/title%3e%3cdesc%20id='desc'%3eGIS%20点位图标;类别:水源;样式:classified%3c/desc%3e%3cdefs%3e%3csymbol%20id='icon-fire-pool'%20viewBox='0%200%20100%20100'%3e%3cg%20stroke='currentColor'%20stroke-width='6'%20stroke-linecap='round'%20stroke-linejoin='round'%20fill='none'%3e%3cpath%20d='M16%2039h68v43H16zM25%2055c6-5%2012-5%2018%200s12%205%2018%200%2012-5%2018%200M25%2068c6-5%2012-5%2018%200s12%205%2018%200%2012-5%2018%200'/%3e%3cpath%20d='M67%2021v28M77%2021v28M67%2029h10M67%2039h10'/%3e%3c/g%3e%3cpath%20d='M28%2025h25l-6%207H28z'%20fill='currentColor'/%3e%3c/symbol%3e%3c/defs%3e%3cg%20color='%2338BDF8'%3e%3cuse%20href='%23icon-fire-pool'%20x='16'%20y='16'%20width='96'%20height='96'/%3e%3c/g%3e%3c/svg%3e", Pt = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='128'%20height='128'%20viewBox='0%200%20128%20128'%20role='img'%20aria-labelledby='title%20desc'%3e%3ctitle%20id='title'%3e医院资源点%3c/title%3e%3cdesc%20id='desc'%3eGIS%20点位图标;类别:医疗;样式:classified%3c/desc%3e%3cdefs%3e%3csymbol%20id='icon-hospital'%20viewBox='0%200%20100%20100'%3e%3cg%20stroke='currentColor'%20stroke-width='6'%20stroke-linecap='round'%20stroke-linejoin='round'%20fill='none'%3e%3cpath%20d='M18%2087V29h64v58M10%2087h80M29%2087V72h14v15M57%2087V72h14v15'/%3e%3cpath%20d='M50%2038v22M39%2049h22'%20stroke='%23F8FAFC'%20stroke-width='9'/%3e%3c/g%3e%3cpath%20d='M27%2022h46v12H27z'%20fill='currentColor'/%3e%3c/symbol%3e%3c/defs%3e%3cg%20color='%2322D3EE'%3e%3cuse%20href='%23icon-hospital'%20x='16'%20y='16'%20width='96'%20height='96'/%3e%3c/g%3e%3c/svg%3e", Et = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='128'%20height='128'%20viewBox='0%200%20128%20128'%20role='img'%20aria-labelledby='title%20desc'%3e%3ctitle%20id='title'%3e市政消火栓%3c/title%3e%3cdesc%20id='desc'%3eGIS%20点位图标;类别:消防;样式:classified%3c/desc%3e%3cdefs%3e%3csymbol%20id='icon-hydrant-municipal'%20viewBox='0%200%20100%20100'%3e%3cg%20stroke='currentColor'%20stroke-width='6'%20stroke-linecap='round'%20stroke-linejoin='round'%20fill='none'%3e%3cpath%20d='M10%2086h80M18%2086V48h18v38M64%2086V35h20v51M21%2057h4M29%2057h4M21%2068h4M29%2068h4M69%2046h4M77%2046h4M69%2058h4M77%2058h4'%20opacity='0.7'/%3e%3cpath%20d='M42%2086V60h18v26M39%2060h24l-4-11H43zM46%2049v-7h10v7'/%3e%3cpath%20d='M42%2067h-8v12h8M60%2067h8v12h-8'/%3e%3c/g%3e%3ccircle%20cx='51'%20cy='72'%20r='5'%20fill='%23F8FAFC'/%3e%3c/symbol%3e%3c/defs%3e%3cg%20color='%23FF4D3D'%3e%3cuse%20href='%23icon-hydrant-municipal'%20x='16'%20y='16'%20width='96'%20height='96'/%3e%3c/g%3e%3c/svg%3e", It = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='128'%20height='128'%20viewBox='0%200%20128%20128'%20role='img'%20aria-labelledby='title%20desc'%3e%3ctitle%20id='title'%3e天然水源%3c/title%3e%3cdesc%20id='desc'%3eGIS%20点位图标;类别:水源;样式:classified%3c/desc%3e%3cdefs%3e%3csymbol%20id='icon-natural-water'%20viewBox='0%200%20100%20100'%3e%3cg%20stroke='currentColor'%20stroke-width='6'%20stroke-linecap='round'%20stroke-linejoin='round'%20fill='none'%3e%3cpath%20d='M14%2050l20-24%2014%2016%2011-12%2027%2029'/%3e%3cpath%20d='M15%2064c8-6%2015-6%2023%200s15%206%2023%200%2015-6%2024%200M15%2078c8-6%2015-6%2023%200s15%206%2023%200%2015-6%2024%200'/%3e%3c/g%3e%3ccircle%20cx='72'%20cy='23'%20r='8'%20fill='%23F8FAFC'/%3e%3c/symbol%3e%3c/defs%3e%3cg%20color='%2338BDF8'%3e%3cuse%20href='%23icon-natural-water'%20x='16'%20y='16'%20width='96'%20height='96'/%3e%3c/g%3e%3c/svg%3e", Rt = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='128'%20height='128'%20viewBox='0%200%20128%20128'%20role='img'%20aria-labelledby='title%20desc'%3e%3ctitle%20id='title'%3e室外消火栓(地上式)%3c/title%3e%3cdesc%20id='desc'%3eGIS%20点位图标;类别:消防;样式:classified%3c/desc%3e%3cdefs%3e%3csymbol%20id='icon-hydrant-ground'%20viewBox='0%200%20100%20100'%3e%3cg%20stroke='currentColor'%20stroke-width='7'%20stroke-linecap='round'%20stroke-linejoin='round'%20fill='none'%3e%3cpath%20d='M12%2084h76M38%2084V45h24v39M38%2057H24v16h14M62%2057h14v16H62'/%3e%3cpath%20d='M33%2045h34l-5-16H38zM44%2029v-8h12v8'/%3e%3ccircle%20cx='24'%20cy='65'%20r='5'%20fill='currentColor'/%3e%3ccircle%20cx='76'%20cy='65'%20r='5'%20fill='currentColor'/%3e%3c/g%3e%3cpath%20d='M50%2055l7%2012H43z'%20fill='%23F8FAFC'/%3e%3c/symbol%3e%3c/defs%3e%3cg%20color='%23FF4D3D'%3e%3cuse%20href='%23icon-hydrant-ground'%20x='16'%20y='16'%20width='96'%20height='96'/%3e%3c/g%3e%3c/svg%3e", Nt = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='128'%20height='128'%20viewBox='0%200%20128%20128'%20role='img'%20aria-labelledby='title%20desc'%3e%3ctitle%20id='title'%3e室外消火栓(地下式)%3c/title%3e%3cdesc%20id='desc'%3eGIS%20点位图标;类别:消防;样式:classified%3c/desc%3e%3cdefs%3e%3csymbol%20id='icon-hydrant-underground'%20viewBox='0%200%20100%20100'%3e%3cg%20stroke='currentColor'%20stroke-width='6'%20stroke-linecap='round'%20stroke-linejoin='round'%20fill='none'%3e%3cpath%20d='M12%2040h76'/%3e%3cellipse%20cx='50'%20cy='39'%20rx='22'%20ry='9'%20fill='currentColor'/%3e%3cpath%20d='M35%2045v30h30V45M42%2075v12M58%2075v12M31%2087h38'/%3e%3cpath%20d='M43%2054h14M50%2047v18'%20stroke='%23F8FAFC'/%3e%3c/g%3e%3cpath%20d='M25%2028l-7-8M75%2028l7-8'%20stroke='currentColor'%20stroke-width='5'%20stroke-linecap='round'/%3e%3c/symbol%3e%3c/defs%3e%3cg%20color='%23FF4D3D'%3e%3cuse%20href='%23icon-hydrant-underground'%20x='16'%20y='16'%20width='96'%20height='96'/%3e%3c/g%3e%3c/svg%3e", At = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='128'%20height='128'%20viewBox='0%200%20128%20128'%20role='img'%20aria-labelledby='title%20desc'%3e%3ctitle%20id='title'%3e室外消火栓%3c/title%3e%3cdesc%20id='desc'%3eGIS%20点位图标;类别:消防;样式:classified%3c/desc%3e%3cdefs%3e%3csymbol%20id='icon-hydrant-general'%20viewBox='0%200%20100%20100'%3e%3cg%20stroke='currentColor'%20stroke-width='7'%20stroke-linecap='round'%20stroke-linejoin='round'%20fill='none'%3e%3cpath%20d='M35%2087h30M39%2087V48h22v39M39%2056H25v17h14M61%2056h14v17H61'/%3e%3cpath%20d='M34%2048h32l-5-15H39zM44%2033v-9h12v9'/%3e%3ccircle%20cx='25'%20cy='64'%20r='5'%20fill='currentColor'/%3e%3ccircle%20cx='75'%20cy='64'%20r='5'%20fill='currentColor'/%3e%3c/g%3e%3cpath%20d='M50%2058c-7%209-10%2014-10%2019a10%2010%200%200%200%2020%200c0-5-3-10-10-19z'%20fill='%23F8FAFC'/%3e%3c/symbol%3e%3c/defs%3e%3cg%20color='%23FF4D3D'%3e%3cuse%20href='%23icon-hydrant-general'%20x='16'%20y='16'%20width='96'%20height='96'/%3e%3c/g%3e%3c/svg%3e", Ft = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='128'%20height='128'%20viewBox='0%200%20128%20128'%20role='img'%20aria-labelledby='title%20desc'%3e%3ctitle%20id='title'%3e公安资源点%3c/title%3e%3cdesc%20id='desc'%3eGIS%20点位图标;类别:公安;样式:classified%3c/desc%3e%3cdefs%3e%3csymbol%20id='icon-police'%20viewBox='0%200%20100%20100'%3e%3cpath%20d='M50%2014l32%2011v23c0%2021-13%2034-32%2041-19-7-32-20-32-41V25z'%20fill='none'%20stroke='currentColor'%20stroke-width='7'%20stroke-linejoin='round'/%3e%3cpath%20d='M50%2030l5.5%2011.2%2012.4%201.8-9%208.8%202.1%2012.4L50%2058.4l-11%205.8%202.1-12.4-9-8.8%2012.4-1.8z'%20fill='%23F8FAFC'/%3e%3cpath%20d='M35%2073h30'%20stroke='currentColor'%20stroke-width='6'%20stroke-linecap='round'/%3e%3c/symbol%3e%3c/defs%3e%3cg%20color='%235B7CFF'%3e%3cuse%20href='%23icon-police'%20x='16'%20y='16'%20width='96'%20height='96'/%3e%3c/g%3e%3c/svg%3e", K = {
|
|
1728
|
+
OutdoorFireHydrant: At,
|
|
1729
|
+
UndergroundHydrant: Nt,
|
|
1730
|
+
AboveGroundHydrant: Rt,
|
|
1731
|
+
MunicipalFireHydrants: Et,
|
|
1732
|
+
FireWaterReservoir: Tt,
|
|
1733
|
+
NaturalWater: It,
|
|
1734
|
+
HospitalResourcePoint: Pt,
|
|
1735
|
+
PublicSecurityResourcePoint: Ft,
|
|
1736
|
+
SupportMaterialPoint: xt,
|
|
1737
|
+
FireStation: kt,
|
|
1738
|
+
LinkageUnit: Ct
|
|
1739
|
+
}, mr = Object.freeze(
|
|
1740
|
+
Object.keys(K)
|
|
1713
1741
|
);
|
|
1714
|
-
function
|
|
1742
|
+
function Dt(s) {
|
|
1715
1743
|
const e = s?.trim();
|
|
1716
1744
|
return !e || !Object.prototype.hasOwnProperty.call(
|
|
1717
|
-
|
|
1745
|
+
K,
|
|
1718
1746
|
e
|
|
1719
|
-
) ? null :
|
|
1747
|
+
) ? null : K[e];
|
|
1720
1748
|
}
|
|
1721
|
-
function
|
|
1722
|
-
return s.imageUrl?.trim() ||
|
|
1749
|
+
function Lt(s) {
|
|
1750
|
+
return s.imageUrl?.trim() || Dt(s.ontologyId);
|
|
1723
1751
|
}
|
|
1724
1752
|
new g();
|
|
1725
|
-
function
|
|
1726
|
-
return s instanceof
|
|
1753
|
+
function we(s) {
|
|
1754
|
+
return s instanceof D || s instanceof N ? s.group : s.classification.group;
|
|
1727
1755
|
}
|
|
1728
|
-
function
|
|
1756
|
+
function Gt(s) {
|
|
1729
1757
|
const e = s.options, t = JSON.stringify(e.points ?? []);
|
|
1730
1758
|
switch (s.category) {
|
|
1731
1759
|
case "circle":
|
|
@@ -1744,27 +1772,27 @@ function Ft(s) {
|
|
|
1744
1772
|
return `${s.category}|${t}`;
|
|
1745
1773
|
}
|
|
1746
1774
|
}
|
|
1747
|
-
function
|
|
1775
|
+
function _e(s, e = "solid") {
|
|
1748
1776
|
return s === "unfilledArrow" ? "open" : s === "filledArrow" ? "solid" : e;
|
|
1749
1777
|
}
|
|
1750
|
-
function
|
|
1778
|
+
function Bt(s) {
|
|
1751
1779
|
if (s.showArrow === !1) return "none";
|
|
1752
1780
|
const e = s.startArrowStyle !== void 0 && s.startArrowStyle !== null, t = s.endArrowStyle !== void 0 && s.endArrowStyle !== null;
|
|
1753
1781
|
return e && t ? "both" : t ? "right" : e ? "left" : "none";
|
|
1754
1782
|
}
|
|
1755
|
-
function
|
|
1756
|
-
const e =
|
|
1783
|
+
function Me(s) {
|
|
1784
|
+
const e = Bt(s), t = _e(s.startArrowStyle), r = _e(s.endArrowStyle);
|
|
1757
1785
|
return {
|
|
1758
1786
|
arrowMode: e,
|
|
1759
1787
|
startArrowStyle: t,
|
|
1760
1788
|
endArrowStyle: r
|
|
1761
1789
|
};
|
|
1762
1790
|
}
|
|
1763
|
-
function
|
|
1791
|
+
function Ut(s, e) {
|
|
1764
1792
|
const t = s.options;
|
|
1765
1793
|
return `${t.strokeColor}|${t.strokeWidth}|${t.strokeOpacity}|${t.fillColor}|${t.fillOpacity}|${e}|${t.fontColor ?? ""}|${t.fontSize ?? ""}`;
|
|
1766
1794
|
}
|
|
1767
|
-
class
|
|
1795
|
+
class Wt {
|
|
1768
1796
|
/** 标绘 id → 渲染记录 */
|
|
1769
1797
|
_entries = /* @__PURE__ */ new Map();
|
|
1770
1798
|
/** 由 GroundDecalManager 写入的标绘集合(引用共享) */
|
|
@@ -1811,9 +1839,9 @@ class Dt {
|
|
|
1811
1839
|
this._shapes.has(t) || (this._scene.remove(r.group), r.primitive.dispose(), this._entries.delete(t));
|
|
1812
1840
|
let e = 0;
|
|
1813
1841
|
for (const [t, r] of this._shapes) {
|
|
1814
|
-
const i =
|
|
1842
|
+
const i = yt(e);
|
|
1815
1843
|
e += 1;
|
|
1816
|
-
const n = this._entries.get(t), o =
|
|
1844
|
+
const n = this._entries.get(t), o = Gt(r), l = Ut(r, this._opacity);
|
|
1817
1845
|
if (n !== void 0 && n.signature === o && (this._supportsStyleHotUpdate(n) || n.styleSignature === l)) {
|
|
1818
1846
|
this._refreshLightweight(n, i), n.styleSignature = l;
|
|
1819
1847
|
continue;
|
|
@@ -1821,7 +1849,7 @@ class Dt {
|
|
|
1821
1849
|
n !== void 0 && (this._scene.remove(n.group), n.primitive.dispose(), this._entries.delete(t));
|
|
1822
1850
|
const h = this._buildPrimitive(r, i);
|
|
1823
1851
|
if (h === null) continue;
|
|
1824
|
-
const c =
|
|
1852
|
+
const c = we(h);
|
|
1825
1853
|
c.visible = r.options.visible !== !1, this._scene.add(c);
|
|
1826
1854
|
const d = {
|
|
1827
1855
|
plot: r,
|
|
@@ -1856,7 +1884,7 @@ class Dt {
|
|
|
1856
1884
|
*/
|
|
1857
1885
|
_supportsStyleHotUpdate(e) {
|
|
1858
1886
|
const { primitive: t, plot: r } = e;
|
|
1859
|
-
return t instanceof
|
|
1887
|
+
return t instanceof D || t instanceof N || t instanceof F && r.options.pointStyle === "image";
|
|
1860
1888
|
}
|
|
1861
1889
|
/**
|
|
1862
1890
|
* 几何未变时的轻量刷新:
|
|
@@ -1865,11 +1893,11 @@ class Dt {
|
|
|
1865
1893
|
* - 文字:setText(内容 + 颜色 + 不透明度)/ setVisible(不重建图元)。
|
|
1866
1894
|
*/
|
|
1867
1895
|
_refreshLightweight(e, t) {
|
|
1868
|
-
if (e.group.visible = e.plot.options.visible !== !1, e.primitive.setRenderOrder?.(t), e.primitive instanceof
|
|
1896
|
+
if (e.group.visible = e.plot.options.visible !== !1, e.primitive.setRenderOrder?.(t), e.primitive instanceof D) {
|
|
1869
1897
|
const r = e.plot.options, {
|
|
1870
1898
|
startArrowStyle: i,
|
|
1871
1899
|
endArrowStyle: n
|
|
1872
|
-
} =
|
|
1900
|
+
} = Me(r);
|
|
1873
1901
|
e.primitive.setColor(
|
|
1874
1902
|
r.strokeColor,
|
|
1875
1903
|
(r.strokeOpacity ?? 100) * this._opacity
|
|
@@ -1879,7 +1907,7 @@ class Dt {
|
|
|
1879
1907
|
const l = Math.max(o * 4, 1), h = Math.max(o * 3, 0.8);
|
|
1880
1908
|
e.primitive.setArrowSizeMeters(l, h), e.primitive.setVisible(r.visible !== !1);
|
|
1881
1909
|
}
|
|
1882
|
-
if (e.primitive instanceof
|
|
1910
|
+
if (e.primitive instanceof F) {
|
|
1883
1911
|
const r = e.plot.options;
|
|
1884
1912
|
r.pointStyle === "image" && e.primitive.setImageOpacity((r.fillOpacity ?? 100) * this._opacity);
|
|
1885
1913
|
}
|
|
@@ -1907,7 +1935,7 @@ class Dt {
|
|
|
1907
1935
|
offsetEastMeters: r.offsetX,
|
|
1908
1936
|
offsetNorthMeters: r.offsetY,
|
|
1909
1937
|
metersPerPixel: r.scale
|
|
1910
|
-
}), e.primitive.setVisible(r.visible !== !1), e.group =
|
|
1938
|
+
}), e.primitive.setVisible(r.visible !== !1), e.group = we(e.primitive), e.group.visible = r.visible !== !1;
|
|
1911
1939
|
}
|
|
1912
1940
|
}
|
|
1913
1941
|
// ── 内部:按 category 构建图元 ──
|
|
@@ -1924,8 +1952,8 @@ class Dt {
|
|
|
1924
1952
|
if (i.length === 0) return null;
|
|
1925
1953
|
const c = r;
|
|
1926
1954
|
if (c.pointStyle === "image") {
|
|
1927
|
-
const d =
|
|
1928
|
-
return d ? (this._watchImageTexture(d), new
|
|
1955
|
+
const d = Lt(c);
|
|
1956
|
+
return d ? (this._watchImageTexture(d), new F({
|
|
1929
1957
|
position: i[0],
|
|
1930
1958
|
shape: "image",
|
|
1931
1959
|
imageUrl: d,
|
|
@@ -1941,7 +1969,7 @@ class Dt {
|
|
|
1941
1969
|
renderOrder: t
|
|
1942
1970
|
})) : (console.warn(`[soonspacejs] Unknown point image ontology id: ${c.ontologyId ?? ""}`), null);
|
|
1943
1971
|
}
|
|
1944
|
-
return new
|
|
1972
|
+
return new F({
|
|
1945
1973
|
position: i[0],
|
|
1946
1974
|
shape: c.pointStyle ?? "circle",
|
|
1947
1975
|
size: c.size ?? 100,
|
|
@@ -1957,7 +1985,7 @@ class Dt {
|
|
|
1957
1985
|
case "circle": {
|
|
1958
1986
|
if (i.length === 0) return null;
|
|
1959
1987
|
const c = r;
|
|
1960
|
-
return new
|
|
1988
|
+
return new ge({
|
|
1961
1989
|
center: i[0],
|
|
1962
1990
|
radius: c.radius ?? 100,
|
|
1963
1991
|
strokeColor: c.strokeColor,
|
|
@@ -1972,7 +2000,7 @@ class Dt {
|
|
|
1972
2000
|
case "sector": {
|
|
1973
2001
|
if (i.length === 0) return null;
|
|
1974
2002
|
const c = r;
|
|
1975
|
-
return new
|
|
2003
|
+
return new ge({
|
|
1976
2004
|
center: i[0],
|
|
1977
2005
|
radius: c.radius ?? 100,
|
|
1978
2006
|
strokeColor: c.strokeColor,
|
|
@@ -1988,7 +2016,7 @@ class Dt {
|
|
|
1988
2016
|
}
|
|
1989
2017
|
case "polygon":
|
|
1990
2018
|
case "rectangle":
|
|
1991
|
-
return i.length < 3 ? null : new
|
|
2019
|
+
return i.length < 3 ? null : new ue({
|
|
1992
2020
|
points: i,
|
|
1993
2021
|
strokeColor: r.strokeColor,
|
|
1994
2022
|
strokeWidth: r.strokeWidth ?? 0,
|
|
@@ -2002,7 +2030,7 @@ class Dt {
|
|
|
2002
2030
|
const c = e.generateCoords();
|
|
2003
2031
|
if (c.length < 3) return null;
|
|
2004
2032
|
const d = r;
|
|
2005
|
-
return new
|
|
2033
|
+
return new ue({
|
|
2006
2034
|
points: c,
|
|
2007
2035
|
strokeColor: d.strokeColor,
|
|
2008
2036
|
strokeWidth: d.strokeWidth ?? 0,
|
|
@@ -2019,8 +2047,8 @@ class Dt {
|
|
|
2019
2047
|
arrowMode: d,
|
|
2020
2048
|
startArrowStyle: f,
|
|
2021
2049
|
endArrowStyle: v
|
|
2022
|
-
} =
|
|
2023
|
-
return new
|
|
2050
|
+
} = Me(c), M = c.strokeStyle === "dashed", y = M ? 60 : void 0, m = M ? 40 : void 0, w = typeof c.strokeWidth == "number" && c.strokeWidth > 0 ? c.strokeWidth : 5, k = Math.max(w * 4, 1), T = Math.max(w * 3, 0.8);
|
|
2051
|
+
return new D({
|
|
2024
2052
|
points: i,
|
|
2025
2053
|
strokeColor: c.strokeColor,
|
|
2026
2054
|
strokeOpacity: o,
|
|
@@ -2032,7 +2060,7 @@ class Dt {
|
|
|
2032
2060
|
startArrowStyle: f,
|
|
2033
2061
|
endArrowStyle: v,
|
|
2034
2062
|
arrowWidthMode: "world",
|
|
2035
|
-
arrowLengthMeters:
|
|
2063
|
+
arrowLengthMeters: k,
|
|
2036
2064
|
arrowWidthMeters: T,
|
|
2037
2065
|
dashLengthMeters: y,
|
|
2038
2066
|
gapLengthMeters: m,
|
|
@@ -2095,7 +2123,7 @@ class Dt {
|
|
|
2095
2123
|
r.onload = n, r.onerror = n, r.src = t, r.complete && queueMicrotask(n);
|
|
2096
2124
|
}
|
|
2097
2125
|
}
|
|
2098
|
-
class
|
|
2126
|
+
class zt {
|
|
2099
2127
|
/** 标绘 id → 实例;与桥接器的 shapes 共用同一引用 */
|
|
2100
2128
|
_items = /* @__PURE__ */ new Map();
|
|
2101
2129
|
/** 标绘管理器 id(对外常量,保持与参考项目一致) */
|
|
@@ -2108,8 +2136,10 @@ class Gt {
|
|
|
2108
2136
|
_overlayAttached = !1;
|
|
2109
2137
|
/** 合并同一帧内多次 _markDirty,值为 requestAnimationFrame 句柄 */
|
|
2110
2138
|
_redrawTimer = null;
|
|
2139
|
+
/** 由 TerrainTilesRenderer 提供的场景包围盒计算器。 */
|
|
2140
|
+
_boundingBoxResolver;
|
|
2111
2141
|
constructor(e) {
|
|
2112
|
-
this.ssp = e.ssp, this._bridge = new
|
|
2142
|
+
this.ssp = e.ssp, this._boundingBoxResolver = e.boundingBoxResolver, this._bridge = new Wt({
|
|
2113
2143
|
scene: e.ssp.viewport.scene,
|
|
2114
2144
|
requestRender: () => this.ssp.render()
|
|
2115
2145
|
});
|
|
@@ -2133,11 +2163,11 @@ class Gt {
|
|
|
2133
2163
|
setPlotSDFPlugin(e) {
|
|
2134
2164
|
this._overlayAttached = !1, this._items.size > 0 && this._markDirty();
|
|
2135
2165
|
}
|
|
2136
|
-
// ──
|
|
2166
|
+
// ── 图形创建:返回 Three.js 数字 id ──
|
|
2137
2167
|
/**
|
|
2138
2168
|
* 添加标绘:由 options.type 决定实例化哪一类 GisPlot*。
|
|
2139
2169
|
*
|
|
2140
|
-
* @returns
|
|
2170
|
+
* @returns 新建标绘继承自 Object3D 的数字 id。
|
|
2141
2171
|
* @throws 当 options.type 未知时抛错。
|
|
2142
2172
|
*/
|
|
2143
2173
|
addPlot(e) {
|
|
@@ -2145,58 +2175,71 @@ class Gt {
|
|
|
2145
2175
|
switch (e.type) {
|
|
2146
2176
|
case "point": {
|
|
2147
2177
|
const { type: r, ...i } = e;
|
|
2148
|
-
t = new
|
|
2178
|
+
t = new it(i);
|
|
2149
2179
|
break;
|
|
2150
2180
|
}
|
|
2151
2181
|
case "line": {
|
|
2152
2182
|
const { type: r, ...i } = e;
|
|
2153
|
-
t = new
|
|
2183
|
+
t = new st(i);
|
|
2154
2184
|
break;
|
|
2155
2185
|
}
|
|
2156
2186
|
case "polygon": {
|
|
2157
2187
|
const { type: r, ...i } = e;
|
|
2158
|
-
t = new
|
|
2188
|
+
t = new nt(i);
|
|
2159
2189
|
break;
|
|
2160
2190
|
}
|
|
2161
2191
|
case "rectangle": {
|
|
2162
2192
|
const { type: r, ...i } = e;
|
|
2163
|
-
t = new
|
|
2193
|
+
t = new ot(i);
|
|
2164
2194
|
break;
|
|
2165
2195
|
}
|
|
2166
2196
|
case "circle": {
|
|
2167
2197
|
const { type: r, ...i } = e;
|
|
2168
|
-
t = new
|
|
2198
|
+
t = new ut(i);
|
|
2169
2199
|
break;
|
|
2170
2200
|
}
|
|
2171
2201
|
case "sector": {
|
|
2172
2202
|
const { type: r, ...i } = e;
|
|
2173
|
-
t = new
|
|
2203
|
+
t = new lt(i);
|
|
2174
2204
|
break;
|
|
2175
2205
|
}
|
|
2176
2206
|
case "text": {
|
|
2177
2207
|
const { type: r, ...i } = e;
|
|
2178
|
-
t = new
|
|
2208
|
+
t = new ht(i);
|
|
2179
2209
|
break;
|
|
2180
2210
|
}
|
|
2181
2211
|
case "arrow": {
|
|
2182
2212
|
const { type: r, ...i } = e;
|
|
2183
|
-
t = new
|
|
2213
|
+
t = new ct(i);
|
|
2184
2214
|
break;
|
|
2185
2215
|
}
|
|
2186
2216
|
default:
|
|
2187
2217
|
throw new Error("GroundDecalManager.addPlot: unknown type");
|
|
2188
2218
|
}
|
|
2189
|
-
return this._items.set(t.id, t), this._markDirty(), t.id;
|
|
2219
|
+
return this._boundingBoxResolver && t.setBoundingBoxResolver(this._boundingBoxResolver), this._items.set(t.id, t), this.ssp.addObject(t), this._markDirty(), t.id;
|
|
2190
2220
|
}
|
|
2191
2221
|
/** 按 id 移除标绘;存在并删除成功时触发重绘 */
|
|
2192
2222
|
remove(e) {
|
|
2193
|
-
this._items.
|
|
2223
|
+
const t = this._items.get(e);
|
|
2224
|
+
t && (this._items.delete(e), this.ssp.removeObject(t), this._markDirty());
|
|
2194
2225
|
}
|
|
2195
2226
|
/** 清空全部标绘 */
|
|
2196
2227
|
clear() {
|
|
2197
|
-
this._items.clear(), this._markDirty();
|
|
2228
|
+
this._items.forEach((e) => this.ssp.removeObject(e)), this._items.clear(), this._markDirty();
|
|
2198
2229
|
}
|
|
2199
2230
|
// ── 查询与修改 ──
|
|
2231
|
+
/**
|
|
2232
|
+
* 返回所有标绘项的 [id, GisPlotBase] 数组(浅拷贝,避免外部修改 _items)。
|
|
2233
|
+
* 业务可用来遍历所有标绘项,或在渲染循环中做自定义处理。
|
|
2234
|
+
* 注意:返回的 GisPlotBase 实例仍是原对象,修改其 options 会影响 _items。
|
|
2235
|
+
*/
|
|
2236
|
+
getAllItems() {
|
|
2237
|
+
return Array.from(this._items.entries().map(([e, t]) => t));
|
|
2238
|
+
}
|
|
2239
|
+
/** 地形重定向或切换后清除全部标绘的场景包围盒缓存。 */
|
|
2240
|
+
invalidateBoundingBoxes() {
|
|
2241
|
+
this._items.forEach((e) => e.invalidateBoundingBox());
|
|
2242
|
+
}
|
|
2200
2243
|
/**
|
|
2201
2244
|
* 读取标绘浅快照(options 为新对象,points 仍共享引用;箭头附带 generatedCoords)。
|
|
2202
2245
|
*
|
|
@@ -2298,7 +2341,8 @@ class Gt {
|
|
|
2298
2341
|
*/
|
|
2299
2342
|
findNearestCoord(e, t, r) {
|
|
2300
2343
|
const i = this._items.get(e);
|
|
2301
|
-
if (!i || !i.options.points || i.options.points.length === 0)
|
|
2344
|
+
if (!i || !i.options.points || i.options.points.length === 0)
|
|
2345
|
+
return -1;
|
|
2302
2346
|
let n = 0, o = 1 / 0;
|
|
2303
2347
|
for (let l = 0; l < i.options.points.length; l++) {
|
|
2304
2348
|
const h = i.options.points[l][0] - t, c = i.options.points[l][1] - r, d = h * h + c * c;
|
|
@@ -2325,7 +2369,7 @@ class Gt {
|
|
|
2325
2369
|
};
|
|
2326
2370
|
/** 释放桥接器内部全部图元与场景挂载 */
|
|
2327
2371
|
dispose() {
|
|
2328
|
-
this._bridge.dispose();
|
|
2372
|
+
this._items.forEach((e) => this.ssp.removeObject(e)), this._items.clear(), this._bridge.dispose();
|
|
2329
2373
|
}
|
|
2330
2374
|
/**
|
|
2331
2375
|
* 标记下一帧重绘;同帧多次调用只调度一次。
|
|
@@ -2337,22 +2381,90 @@ class Gt {
|
|
|
2337
2381
|
}));
|
|
2338
2382
|
}
|
|
2339
2383
|
}
|
|
2340
|
-
const
|
|
2341
|
-
|
|
2384
|
+
const Oe = 5e4, Jt = 10, $t = 10, jt = 10, Ht = 12, Qt = "文本内容";
|
|
2385
|
+
function Yt(s, e) {
|
|
2386
|
+
const { group: t, ellipsoid: r } = s.tiles, i = p.degToRad(e[1]), n = p.degToRad(e[0]), o = new a();
|
|
2387
|
+
r.getCartographicToPosition(
|
|
2388
|
+
i,
|
|
2389
|
+
n,
|
|
2390
|
+
Oe,
|
|
2391
|
+
o
|
|
2392
|
+
);
|
|
2393
|
+
const l = new a();
|
|
2394
|
+
r.getCartographicToNormal(i, n, l);
|
|
2395
|
+
const h = o.applyMatrix4(t.matrixWorld), c = l.transformDirection(t.matrixWorld).negate().normalize();
|
|
2396
|
+
return new Be(
|
|
2397
|
+
h,
|
|
2398
|
+
c,
|
|
2399
|
+
0,
|
|
2400
|
+
Oe * 2
|
|
2401
|
+
).intersectObject(t, !0)[0]?.point.clone() ?? null;
|
|
2402
|
+
}
|
|
2403
|
+
function Ae(s, e) {
|
|
2404
|
+
const t = [];
|
|
2405
|
+
s.tiles.group.updateMatrixWorld(!0);
|
|
2406
|
+
for (const r of e) {
|
|
2407
|
+
const i = Yt(s, r);
|
|
2408
|
+
i && t.push(i);
|
|
2409
|
+
}
|
|
2410
|
+
return t;
|
|
2411
|
+
}
|
|
2412
|
+
function Fe(s, e, t) {
|
|
2413
|
+
if (t.length === 0) return null;
|
|
2414
|
+
const r = new te();
|
|
2415
|
+
if (t.forEach((i) => r.expandByPoint(i)), (s === "circle" || s === "sector") && typeof e.radius == "number" && r.expandByScalar(e.radius), s === "text") {
|
|
2416
|
+
const i = e.fontSize ?? Ht, n = Math.max(
|
|
2417
|
+
(e.content ?? Qt).length,
|
|
2418
|
+
1
|
|
2419
|
+
), o = e.scale ?? 1;
|
|
2420
|
+
r.expandByScalar(i * n * o / 2);
|
|
2421
|
+
}
|
|
2422
|
+
if (s === "point") {
|
|
2423
|
+
const i = e.pointStyle === "image" ? Math.max(
|
|
2424
|
+
e.imageWidth ?? $t,
|
|
2425
|
+
e.imageHeight ?? jt
|
|
2426
|
+
) : e.size ?? Jt;
|
|
2427
|
+
r.expandByScalar(i / 2);
|
|
2428
|
+
}
|
|
2429
|
+
return r.isEmpty() ? null : r;
|
|
2430
|
+
}
|
|
2431
|
+
function Xt(s, e) {
|
|
2432
|
+
const t = e.options, r = e.category === "arrow" ? e.generateCoords() : t.points, i = Ae(
|
|
2433
|
+
s,
|
|
2434
|
+
Array.isArray(r) ? r : []
|
|
2435
|
+
);
|
|
2436
|
+
return Fe(e.category, t, i);
|
|
2437
|
+
}
|
|
2438
|
+
function Vt(s, e, t = 200) {
|
|
2439
|
+
const r = s.groundDecalManager?.getItem(e);
|
|
2440
|
+
if (!r) return !1;
|
|
2441
|
+
const i = r.options, n = r.type === "arrow" && "generatedCoords" in r && r.generatedCoords.length > 0 ? r.generatedCoords : i.points, o = Ae(
|
|
2442
|
+
s,
|
|
2443
|
+
Array.isArray(n) ? n : []
|
|
2444
|
+
), l = Fe(r.type, i, o);
|
|
2445
|
+
return l ? (globalThis.setTimeout(() => {
|
|
2446
|
+
s.ssp.flyToObj(l, "frontTop");
|
|
2447
|
+
}, Math.max(0, t)), !0) : !1;
|
|
2448
|
+
}
|
|
2449
|
+
const qt = "https://sooncps.xwbuilders.com/api/ugis-dataprocess/v1/terrain/NhBLlMx3/", Zt = "https://c.tile.openstreetmap.fr/hot/{z}/{x}/{y}.png";
|
|
2450
|
+
class vr {
|
|
2342
2451
|
constructor(e, t = {}) {
|
|
2343
2452
|
this.ssp = e, this.options = t;
|
|
2344
|
-
const r = t.baseUrl ||
|
|
2345
|
-
if (this.resourceManager = new
|
|
2346
|
-
const i = t.imageryUrl ||
|
|
2453
|
+
const r = t.baseUrl || qt;
|
|
2454
|
+
if (this.resourceManager = new tt(), this.terrainManager = new rt(), t.imageryUrl !== !1) {
|
|
2455
|
+
const i = t.imageryUrl || Zt;
|
|
2347
2456
|
this.resourceManager.addOverlay({
|
|
2348
2457
|
id: this.defaultImageryId,
|
|
2349
2458
|
type: u.XYZ,
|
|
2350
2459
|
options: { id: this.defaultImageryId, url: i, type: u.XYZ }
|
|
2351
2460
|
});
|
|
2352
2461
|
}
|
|
2353
|
-
this.groundDecalManager = new
|
|
2462
|
+
this.groundDecalManager = new zt({
|
|
2463
|
+
ssp: this.ssp,
|
|
2464
|
+
boundingBoxResolver: (i) => Xt(this, i)
|
|
2465
|
+
}), Qe(), this._alphaClipMode = t.alphaClipMode ?? "alphaTest", this._currentTerrainConfig = {
|
|
2354
2466
|
id: this.defaultTerrainId,
|
|
2355
|
-
type:
|
|
2467
|
+
type: x.QUANTIZED_MESH,
|
|
2356
2468
|
url: r
|
|
2357
2469
|
}, this.terrainManager.add(this._currentTerrainConfig), this.terrainManager.setCurrentId(this._currentTerrainConfig.id), this.tiles = this._initTilesRenderer(this._currentTerrainConfig), this._initPlugins(this.tiles, this._currentTerrainConfig);
|
|
2358
2470
|
}
|
|
@@ -2371,7 +2483,7 @@ class or {
|
|
|
2371
2483
|
* 供 cesium-to-three 标绘图元的 RTE 着色器使用。标绘几何烘焙在绝对 ECEF,只有用
|
|
2372
2484
|
* ECEF 相机投影才能与「重定向后地形」对齐,同时保持 reorientation 开启(地形不抖)。
|
|
2373
2485
|
*/
|
|
2374
|
-
_plotVirtualCamera = new
|
|
2486
|
+
_plotVirtualCamera = new ce();
|
|
2375
2487
|
_reorientInverse = new g();
|
|
2376
2488
|
_virtualScale = new a();
|
|
2377
2489
|
/** 资源管理器(存储配置) */
|
|
@@ -2394,7 +2506,7 @@ class or {
|
|
|
2394
2506
|
* 是否使用 Cesium Ion 地形
|
|
2395
2507
|
*/
|
|
2396
2508
|
get isCesiumIon() {
|
|
2397
|
-
return this._currentTerrainConfig.type ===
|
|
2509
|
+
return this._currentTerrainConfig.type === x.CESIUM_ION;
|
|
2398
2510
|
}
|
|
2399
2511
|
/**
|
|
2400
2512
|
* 获取当前地形配置
|
|
@@ -2440,9 +2552,9 @@ class or {
|
|
|
2440
2552
|
this._alphaClipMode = e, this.customMaterialPlugin && (this.customMaterialPlugin.alphaClipMode = e), this._updateAlphaClipMode(), this.render();
|
|
2441
2553
|
}
|
|
2442
2554
|
_initTilesRenderer(e) {
|
|
2443
|
-
return e.type ===
|
|
2555
|
+
return e.type === x.CESIUM_ION ? new E() : (
|
|
2444
2556
|
// Cesium Ion 由插件设置 URL
|
|
2445
|
-
new
|
|
2557
|
+
new E(e.url)
|
|
2446
2558
|
);
|
|
2447
2559
|
}
|
|
2448
2560
|
/**
|
|
@@ -2450,19 +2562,19 @@ class or {
|
|
|
2450
2562
|
* @param config 地形配置
|
|
2451
2563
|
*/
|
|
2452
2564
|
_initPlugins(e, t) {
|
|
2453
|
-
if (this.tilesFadePlugin = new
|
|
2454
|
-
new
|
|
2565
|
+
if (this.tilesFadePlugin = new re({ maximumFadeOutTiles: 200 }), this.updateOnChangePlugin = new ie(), e.registerPlugin(this.tilesFadePlugin), e.registerPlugin(this.updateOnChangePlugin), t.type === x.CESIUM_ION ? e.registerPlugin(
|
|
2566
|
+
new Pe({
|
|
2455
2567
|
apiToken: t.apiToken,
|
|
2456
2568
|
assetId: t.assetId || "1",
|
|
2457
2569
|
autoRefreshToken: t.autoRefreshToken ?? !0,
|
|
2458
2570
|
assetTypeHandler: (r, i) => {
|
|
2459
2571
|
r === "TERRAIN" && i.getPluginByName("QUANTIZED_MESH_PLUGIN") === null && i.registerPlugin(
|
|
2460
|
-
new
|
|
2572
|
+
new Q({ useRecommendedSettings: !0 })
|
|
2461
2573
|
);
|
|
2462
2574
|
}
|
|
2463
2575
|
})
|
|
2464
2576
|
) : (e.registerPlugin(
|
|
2465
|
-
new
|
|
2577
|
+
new Q({ useRecommendedSettings: !0 })
|
|
2466
2578
|
), e.fetchData = async (r) => {
|
|
2467
2579
|
const i = { method: "GET", mode: "cors" };
|
|
2468
2580
|
if (/layer\.json$/.test(r)) {
|
|
@@ -2470,15 +2582,15 @@ class or {
|
|
|
2470
2582
|
return n.metadataAvailability = -1, new Response(JSON.stringify(n));
|
|
2471
2583
|
}
|
|
2472
2584
|
return fetch(r, i);
|
|
2473
|
-
}), this.options.useCustomMaterial !== !1 && (this.customMaterialPlugin = new
|
|
2585
|
+
}), this.options.useCustomMaterial !== !1 && (this.customMaterialPlugin = new et(), this.customMaterialPlugin.alphaClipMode = this._alphaClipMode, e.registerPlugin(this.customMaterialPlugin)), this.imageOverlayPlugin = new ke({
|
|
2474
2586
|
renderer: this.ssp.viewport.renderer,
|
|
2475
2587
|
overlays: []
|
|
2476
|
-
}), e.registerPlugin(this.imageOverlayPlugin), this._ensureGlobeDepth(), this.overlayManager = new
|
|
2588
|
+
}), e.registerPlugin(this.imageOverlayPlugin), this._ensureGlobeDepth(), this.overlayManager = new B(
|
|
2477
2589
|
this.imageOverlayPlugin,
|
|
2478
2590
|
this.resourceManager
|
|
2479
2591
|
), this.overlayManager.restoreFromResourceManager(), this.options.reorientation !== !1) {
|
|
2480
2592
|
const r = this.options.reorientation || { lon: 120, lat: 30 };
|
|
2481
|
-
this.reorientationPlugin = new
|
|
2593
|
+
this.reorientationPlugin = new se({
|
|
2482
2594
|
lon: r.lon,
|
|
2483
2595
|
lat: r.lat,
|
|
2484
2596
|
height: r.height ?? 0.1
|
|
@@ -2532,12 +2644,23 @@ class or {
|
|
|
2532
2644
|
* })
|
|
2533
2645
|
*/
|
|
2534
2646
|
setTerrain(e, t = void 0) {
|
|
2535
|
-
if (t && (this.options = { ...this.options, ...t }), this.terrainManager.has(e.id) || this.terrainManager.add(e), this.terrainManager.setCurrentId(e.id), this.terrainManager.currentId === e.id) {
|
|
2647
|
+
if (this.groundDecalManager?.invalidateBoundingBoxes(), t && (this.options = { ...this.options, ...t }), this.terrainManager.has(e.id) || this.terrainManager.add(e), this.terrainManager.setCurrentId(e.id), this.terrainManager.currentId === e.id) {
|
|
2536
2648
|
const r = this.terrainManager.getCurrent();
|
|
2537
|
-
e.type ===
|
|
2649
|
+
e.type === x.QUANTIZED_MESH && r?.type === x.QUANTIZED_MESH && (r.url = e.url);
|
|
2538
2650
|
}
|
|
2539
2651
|
this._disposeTilesRenderer(), this._currentTerrainConfig = e, this.tiles = this._initTilesRenderer(e), this._initPlugins(this.tiles, e), this._enabled && this.ssp.addObject(this.tiles.group), this.render();
|
|
2540
2652
|
}
|
|
2653
|
+
// =============== 标绘快捷方法 ===============
|
|
2654
|
+
/**
|
|
2655
|
+
* 根据 groundDecalManager.addPlot 返回的 id 飞向标绘。
|
|
2656
|
+
*
|
|
2657
|
+
* @param plotId 标绘 id。
|
|
2658
|
+
* @param delay 延迟执行时间(毫秒),默认 200ms。
|
|
2659
|
+
* @returns true 表示已安排飞向;false 表示标绘或当前地形坐标不可用。
|
|
2660
|
+
*/
|
|
2661
|
+
flyToPlotById(e, t = 200) {
|
|
2662
|
+
return Vt(this, e, t);
|
|
2663
|
+
}
|
|
2541
2664
|
// =============== Overlay 快捷方法 ===============
|
|
2542
2665
|
/**
|
|
2543
2666
|
* 添加 Overlay
|
|
@@ -2704,9 +2827,9 @@ class or {
|
|
|
2704
2827
|
};
|
|
2705
2828
|
beforeRenderHandler = () => {
|
|
2706
2829
|
const { camera: e, renderer: t, scene: r } = this.ssp.viewport;
|
|
2707
|
-
if (e.updateMatrixWorld(), this.tiles.setCamera(e), this.tiles.setResolutionFromRenderer(e, t), this.tiles.update(), this.groundDecalManager && e instanceof
|
|
2830
|
+
if (e.updateMatrixWorld(), this.tiles.setCamera(e), this.tiles.setResolutionFromRenderer(e, t), this.tiles.update(), this.groundDecalManager && e instanceof ce) {
|
|
2708
2831
|
const i = this._ensureGlobeDepth(), n = t.domElement.width, o = t.domElement.height;
|
|
2709
|
-
(i.target.width !== n || i.target.height !== o) && i.resize(n, o),
|
|
2832
|
+
(i.target.width !== n || i.target.height !== o) && i.resize(n, o), Ye(e.near, e.far), i.render(t, e, r, this.tiles.group);
|
|
2710
2833
|
const l = this._buildPlotVirtualCamera(e);
|
|
2711
2834
|
this.groundDecalManager.update({
|
|
2712
2835
|
depthTexture: i.target.texture,
|
|
@@ -2743,7 +2866,7 @@ class or {
|
|
|
2743
2866
|
_ensureGlobeDepth() {
|
|
2744
2867
|
if (!this._globeDepth) {
|
|
2745
2868
|
const { renderer: e } = this.ssp.viewport;
|
|
2746
|
-
this._globeDepth = new
|
|
2869
|
+
this._globeDepth = new Xe(
|
|
2747
2870
|
e.domElement.width,
|
|
2748
2871
|
e.domElement.height
|
|
2749
2872
|
);
|
|
@@ -2751,13 +2874,13 @@ class or {
|
|
|
2751
2874
|
return this._globeDepth;
|
|
2752
2875
|
}
|
|
2753
2876
|
enable() {
|
|
2754
|
-
this._enabled = !0, this.ssp.viewport.camera.layers.enable(
|
|
2877
|
+
this._enabled = !0, this.ssp.viewport.camera.layers.enable(Ve), this.ssp.addObject(this.tiles.group), this.ssp.signals.beforeRender.add(this.beforeRenderHandler);
|
|
2755
2878
|
}
|
|
2756
2879
|
disable() {
|
|
2757
2880
|
this._enabled = !1, this.ssp.removeObject(this.tiles.group), this.ssp.signals.beforeRender.remove(this.beforeRenderHandler);
|
|
2758
2881
|
}
|
|
2759
2882
|
invalidate(e, t, r) {
|
|
2760
|
-
if (!this.reorientationPlugin)
|
|
2883
|
+
if (this.groundDecalManager?.invalidateBoundingBoxes(), !this.reorientationPlugin)
|
|
2761
2884
|
return console.warn(
|
|
2762
2885
|
"TilesRenderer: reorientationPlugin is not enabled, invalidate() will not work."
|
|
2763
2886
|
), () => {
|
|
@@ -2787,7 +2910,7 @@ const P = {
|
|
|
2787
2910
|
GRADIENT: 1,
|
|
2788
2911
|
TOPOGRAPHIC_LINES: 2,
|
|
2789
2912
|
LIGHTING: 3
|
|
2790
|
-
},
|
|
2913
|
+
}, Kt = {
|
|
2791
2914
|
vertexShader: (
|
|
2792
2915
|
/* glsl */
|
|
2793
2916
|
`
|
|
@@ -2813,7 +2936,7 @@ const P = {
|
|
|
2813
2936
|
}
|
|
2814
2937
|
`
|
|
2815
2938
|
)
|
|
2816
|
-
},
|
|
2939
|
+
}, er = {
|
|
2817
2940
|
vertexShader: (
|
|
2818
2941
|
/* glsl */
|
|
2819
2942
|
`
|
|
@@ -2859,10 +2982,10 @@ const P = {
|
|
|
2859
2982
|
`
|
|
2860
2983
|
)
|
|
2861
2984
|
};
|
|
2862
|
-
let
|
|
2863
|
-
class
|
|
2985
|
+
let J = null, $ = null, j = null;
|
|
2986
|
+
class tr {
|
|
2864
2987
|
constructor(e, t) {
|
|
2865
|
-
this.ssp = e, this.options = t, "url" in this.options ? this.tiles = new
|
|
2988
|
+
this.ssp = e, this.options = t, "url" in this.options ? this.tiles = new E(this.options.url) : (this.tiles = new E(), this._initCesiumIon(this.options)), this._initBasePlugins(this.options);
|
|
2866
2989
|
}
|
|
2867
2990
|
tiles;
|
|
2868
2991
|
tilesFadePlugin;
|
|
@@ -2870,8 +2993,8 @@ class Bt {
|
|
|
2870
2993
|
reorientationPlugin;
|
|
2871
2994
|
options;
|
|
2872
2995
|
// 用于模型居中
|
|
2873
|
-
_box = new
|
|
2874
|
-
_sphere = new
|
|
2996
|
+
_box = new te();
|
|
2997
|
+
_sphere = new G();
|
|
2875
2998
|
// 当前材质类型
|
|
2876
2999
|
_materialType = P.DEFAULT;
|
|
2877
3000
|
// 按需渲染标志
|
|
@@ -2883,7 +3006,7 @@ class Bt {
|
|
|
2883
3006
|
*/
|
|
2884
3007
|
_initCesiumIon(e) {
|
|
2885
3008
|
this.tiles.registerPlugin(
|
|
2886
|
-
new
|
|
3009
|
+
new Pe({
|
|
2887
3010
|
apiToken: e.apiToken,
|
|
2888
3011
|
assetId: e.assetId,
|
|
2889
3012
|
autoRefreshToken: e.autoRefreshToken ?? !0
|
|
@@ -2894,9 +3017,9 @@ class Bt {
|
|
|
2894
3017
|
* 初始化基础插件
|
|
2895
3018
|
*/
|
|
2896
3019
|
_initBasePlugins(e) {
|
|
2897
|
-
if (e._managedByPlugin || (
|
|
3020
|
+
if (e._managedByPlugin || (J === null ? J = this.tiles.lruCache : this.tiles.lruCache = J, $ === null ? $ = this.tiles.parseQueue : this.tiles.parseQueue = $, j === null ? j = this.tiles.downloadQueue : this.tiles.downloadQueue = j, this.tiles.lruCache.maxSize = 600, this.tiles.lruCache.minSize = 300, this.tiles.lruCache.unloadPercent = 0.8), this._setupGLTFLoader(), this.tilesFadePlugin = new re({ maximumFadeOutTiles: 200 }), this.updateOnChangePlugin = new ie(), this.tiles.registerPlugin(this.tilesFadePlugin), this.tiles.registerPlugin(this.updateOnChangePlugin), this.tiles.maxDepth = e.maxDepth ?? 20, this.tiles.errorTarget = e.errorTarget ?? 2, this.options.reorientation) {
|
|
2898
3021
|
const t = this.options.reorientation || { lon: 120, lat: 30 };
|
|
2899
|
-
this.reorientationPlugin = new
|
|
3022
|
+
this.reorientationPlugin = new se({
|
|
2900
3023
|
lon: t.lon,
|
|
2901
3024
|
lat: t.lat,
|
|
2902
3025
|
height: t.height ?? 0.1
|
|
@@ -2912,7 +3035,7 @@ class Bt {
|
|
|
2912
3035
|
* 设置 GLTF Loader
|
|
2913
3036
|
*/
|
|
2914
3037
|
_setupGLTFLoader() {
|
|
2915
|
-
const e = new
|
|
3038
|
+
const e = new be(this.tiles.manager), t = this.ssp.manager?.store?.modelManager;
|
|
2916
3039
|
if (t?.gltfLoader) {
|
|
2917
3040
|
const { dracoLoader: r, ktx2Loader: i, meshoptDecoder: n } = t.gltfLoader;
|
|
2918
3041
|
r && e.setDRACOLoader(r), i && e.setKTX2Loader(i), n && e.setMeshoptDecoder(n);
|
|
@@ -2970,15 +3093,15 @@ class Bt {
|
|
|
2970
3093
|
r.material = r.originalMaterial, r.material && (r.material.side = 2), r.receiveShadow = !1, r.castShadow = !1;
|
|
2971
3094
|
break;
|
|
2972
3095
|
case P.GRADIENT:
|
|
2973
|
-
r.material = new
|
|
3096
|
+
r.material = new he(Kt), r.material.side = 2, r.receiveShadow = !1, r.castShadow = !1;
|
|
2974
3097
|
break;
|
|
2975
3098
|
case P.TOPOGRAPHIC_LINES: {
|
|
2976
|
-
const i = new
|
|
3099
|
+
const i = new he(er);
|
|
2977
3100
|
i.extensions = { derivatives: !0 }, i.side = 2, r.material = i, r.receiveShadow = !1, r.castShadow = !1;
|
|
2978
3101
|
break;
|
|
2979
3102
|
}
|
|
2980
3103
|
case P.LIGHTING:
|
|
2981
|
-
r.material = new
|
|
3104
|
+
r.material = new Ue(), r.material.side = 2, r.receiveShadow = !0, r.castShadow = !0;
|
|
2982
3105
|
break;
|
|
2983
3106
|
}
|
|
2984
3107
|
});
|
|
@@ -3038,8 +3161,8 @@ class Bt {
|
|
|
3038
3161
|
), this.loedTilesSets.clear(), this.tiles.removeEventListener("load-model", this.onLoadModel), this.tiles.removeEventListener("dispose-model", this.onDisposeModel), this.options._managedByPlugin || (this.tiles.removeEventListener("load-model", this._onNeedsRender), this.tiles.removeEventListener("needs-render", this._onNeedsRender), this.tiles.removeEventListener("needs-update", this._onNeedsRender)), this.tiles.dispose();
|
|
3039
3162
|
}
|
|
3040
3163
|
}
|
|
3041
|
-
const
|
|
3042
|
-
class
|
|
3164
|
+
const H = 2;
|
|
3165
|
+
class wr {
|
|
3043
3166
|
constructor(e) {
|
|
3044
3167
|
this.ssp = e;
|
|
3045
3168
|
const { controls: t, viewport: r } = e;
|
|
@@ -3065,7 +3188,7 @@ class ar {
|
|
|
3065
3188
|
_sourceFrame = new g();
|
|
3066
3189
|
_placementMatrix = new g();
|
|
3067
3190
|
_upCorrectionMatrix = new g();
|
|
3068
|
-
_boundingSphere = new
|
|
3191
|
+
_boundingSphere = new G();
|
|
3069
3192
|
_beforeRenderHandler = () => {
|
|
3070
3193
|
this.needsUpdate && (this.needsUpdate = !1, this.ssp.viewport.camera.updateMatrixWorld(), this.tilesMap.forEach((e) => {
|
|
3071
3194
|
e.tiles.setCamera(this.ssp.viewport.camera), e.tiles.setResolutionFromRenderer(this.ssp.viewport.camera, this.ssp.viewport.renderer), e.applyAutoCenter(), e.tiles.group.updateMatrixWorld(), e.tiles.update();
|
|
@@ -3105,8 +3228,8 @@ class ar {
|
|
|
3105
3228
|
async loadTiles(e) {
|
|
3106
3229
|
const t = "url" in e ? e.url : e.assetId;
|
|
3107
3230
|
if (this.tilesMap.has(t))
|
|
3108
|
-
return
|
|
3109
|
-
const { ssp: r } = this, i = this._getReferencePlacement(e), n = this._getTilesRendererOptions(e, i), o = new
|
|
3231
|
+
return L.utils.warn(`${t} already loaded`), this.tilesMap.get(t);
|
|
3232
|
+
const { ssp: r } = this, i = this._getReferencePlacement(e), n = this._getTilesRendererOptions(e, i), o = new tr(r, {
|
|
3110
3233
|
...n,
|
|
3111
3234
|
_managedByPlugin: !0
|
|
3112
3235
|
});
|
|
@@ -3165,7 +3288,7 @@ class ar {
|
|
|
3165
3288
|
}
|
|
3166
3289
|
applyReferencePlacement(e, t) {
|
|
3167
3290
|
if (!this._referenceOrigin)
|
|
3168
|
-
return
|
|
3291
|
+
return L.utils.warn("TilesRendererManager: reference origin is not set."), !1;
|
|
3169
3292
|
const { ellipsoid: r, group: i } = e.tiles, n = this._referenceOrigin, o = this._isGeoreferenced(e);
|
|
3170
3293
|
if (r.getObjectFrame(
|
|
3171
3294
|
p.degToRad(n.lat),
|
|
@@ -3175,7 +3298,7 @@ class ar {
|
|
|
3175
3298
|
0,
|
|
3176
3299
|
0,
|
|
3177
3300
|
this._referenceFrame,
|
|
3178
|
-
|
|
3301
|
+
H
|
|
3179
3302
|
), this._placementMatrix.copy(this._referenceFrame).invert(), t)
|
|
3180
3303
|
r.getObjectFrame(
|
|
3181
3304
|
p.degToRad(t.lat),
|
|
@@ -3185,7 +3308,7 @@ class ar {
|
|
|
3185
3308
|
0,
|
|
3186
3309
|
0,
|
|
3187
3310
|
this._targetFrame,
|
|
3188
|
-
|
|
3311
|
+
H
|
|
3189
3312
|
), this._placementMatrix.multiply(this._targetFrame), o ? (this._sourceFrame.copy(this._getSourceFrame(e)).invert(), this._placementMatrix.multiply(this._sourceFrame)) : (this._getUpCorrectionMatrix(t.up ?? "+z"), this._placementMatrix.multiply(this._upCorrectionMatrix));
|
|
3190
3313
|
else if (!o)
|
|
3191
3314
|
return !1;
|
|
@@ -3211,7 +3334,7 @@ class ar {
|
|
|
3211
3334
|
0,
|
|
3212
3335
|
0,
|
|
3213
3336
|
this._sourceFrame,
|
|
3214
|
-
|
|
3337
|
+
H
|
|
3215
3338
|
), this._sourceFrame;
|
|
3216
3339
|
}
|
|
3217
3340
|
_getReferencePlacement(e) {
|
|
@@ -3257,7 +3380,7 @@ class ar {
|
|
|
3257
3380
|
this.clear(), this.ssp.signals.beforeRender.remove(this._beforeRenderHandler), this.ssp.signals.cameraObjectChange.remove(this._onCameraObjectChange), this._lruCache = null, this._parseQueue = null, this._downloadQueue = null;
|
|
3258
3381
|
}
|
|
3259
3382
|
}
|
|
3260
|
-
function
|
|
3383
|
+
function _r(s) {
|
|
3261
3384
|
if (s == null) return [0, 0, 0, 0];
|
|
3262
3385
|
const e = String(s).trim().toLowerCase();
|
|
3263
3386
|
if (e === "" || e === "transparent") return [0, 0, 0, 0];
|
|
@@ -3289,48 +3412,48 @@ function lr(s) {
|
|
|
3289
3412
|
}
|
|
3290
3413
|
return [1, 1, 1, 1];
|
|
3291
3414
|
}
|
|
3292
|
-
function
|
|
3415
|
+
function Mr(s, e) {
|
|
3293
3416
|
typeof s.fillOpacity == "number" && Number.isFinite(s.fillOpacity) ? e[0] = _(s.fillOpacity / 100) : typeof s.opacity == "number" && Number.isFinite(s.opacity) ? e[0] = _(s.opacity) : e[0] = 1, typeof s.strokeOpacity == "number" && Number.isFinite(s.strokeOpacity) ? e[1] = _(s.strokeOpacity / 100) : typeof s.opacity == "number" && Number.isFinite(s.opacity) ? e[1] = _(s.opacity) : e[1] = 1;
|
|
3294
3417
|
}
|
|
3295
3418
|
function _(s) {
|
|
3296
3419
|
return !Number.isFinite(s) || s < 0 ? 0 : s > 1 ? 1 : s;
|
|
3297
3420
|
}
|
|
3298
|
-
const
|
|
3299
|
-
function
|
|
3421
|
+
const Se = 100, ne = 1e-4;
|
|
3422
|
+
function I(s, e) {
|
|
3300
3423
|
const t = s[0] - e[0], r = s[1] - e[1];
|
|
3301
3424
|
return Math.sqrt(t * t + r * r);
|
|
3302
3425
|
}
|
|
3303
|
-
function
|
|
3426
|
+
function rr(s) {
|
|
3304
3427
|
let e = 0;
|
|
3305
3428
|
for (let t = 0; t < s.length - 1; t++)
|
|
3306
|
-
e +=
|
|
3429
|
+
e += I(s[t], s[t + 1]);
|
|
3307
3430
|
return e;
|
|
3308
3431
|
}
|
|
3309
|
-
function
|
|
3310
|
-
return Math.pow(
|
|
3432
|
+
function Or(s) {
|
|
3433
|
+
return Math.pow(rr(s), 0.99);
|
|
3311
3434
|
}
|
|
3312
|
-
function
|
|
3435
|
+
function De(s, e) {
|
|
3313
3436
|
return [(s[0] + e[0]) / 2, (s[1] + e[1]) / 2];
|
|
3314
3437
|
}
|
|
3315
|
-
function
|
|
3438
|
+
function ee(s, e) {
|
|
3316
3439
|
let t;
|
|
3317
3440
|
const r = Math.asin(
|
|
3318
|
-
Math.abs(e[1] - s[1]) /
|
|
3441
|
+
Math.abs(e[1] - s[1]) / I(s, e)
|
|
3319
3442
|
);
|
|
3320
3443
|
return e[1] >= s[1] && e[0] >= s[0] ? t = r + Math.PI : e[1] >= s[1] && e[0] < s[0] ? t = Math.PI * 2 - r : e[1] < s[1] && e[0] < s[0] ? t = r : t = Math.PI - r, t;
|
|
3321
3444
|
}
|
|
3322
|
-
function
|
|
3323
|
-
const r =
|
|
3445
|
+
function Sr(s, e, t) {
|
|
3446
|
+
const r = ee(e, s) - ee(e, t);
|
|
3324
3447
|
return r < 0 ? r + Math.PI * 2 : r;
|
|
3325
3448
|
}
|
|
3326
|
-
function
|
|
3449
|
+
function ir(s, e, t) {
|
|
3327
3450
|
return (t[1] - s[1]) * (e[0] - s[0]) > (e[1] - s[1]) * (t[0] - s[0]);
|
|
3328
3451
|
}
|
|
3329
|
-
function
|
|
3330
|
-
const n =
|
|
3452
|
+
function br(s, e, t, r, i) {
|
|
3453
|
+
const n = ee(s, e), o = i ? n + t : n - t, l = r * Math.cos(o), h = r * Math.sin(o);
|
|
3331
3454
|
return [e[0] + l, e[1] + h];
|
|
3332
3455
|
}
|
|
3333
|
-
function
|
|
3456
|
+
function oe(s, e, t) {
|
|
3334
3457
|
let r = s[0] - e[0], i = s[1] - e[1];
|
|
3335
3458
|
const n = Math.sqrt(r * r + i * i);
|
|
3336
3459
|
r /= n, i /= n;
|
|
@@ -3338,20 +3461,20 @@ function se(s, e, t) {
|
|
|
3338
3461
|
const h = Math.sqrt(o * o + l * l);
|
|
3339
3462
|
return o /= h, l /= h, [r + o, i + l];
|
|
3340
3463
|
}
|
|
3341
|
-
function
|
|
3342
|
-
const i =
|
|
3464
|
+
function ae(s, e, t, r) {
|
|
3465
|
+
const i = oe(e, t, r);
|
|
3343
3466
|
let n, o, l, h, c;
|
|
3344
|
-
const d = Math.sqrt(i[0] * i[0] + i[1] * i[1]), f = i[0] / d, v = i[1] / d, M =
|
|
3345
|
-
return d >
|
|
3467
|
+
const d = Math.sqrt(i[0] * i[0] + i[1] * i[1]), f = i[0] / d, v = i[1] / d, M = I(e, t), y = I(t, r);
|
|
3468
|
+
return d > ne ? ir(e, t, r) ? (l = s * M, h = t[0] - l * v, c = t[1] + l * f, n = [h, c], l = s * y, h = t[0] + l * v, c = t[1] - l * f, o = [h, c]) : (l = s * M, h = t[0] + l * v, c = t[1] - l * f, n = [h, c], l = s * y, h = t[0] - l * v, c = t[1] + l * f, o = [h, c]) : (h = t[0] + s * (e[0] - t[0]), c = t[1] + s * (e[1] - t[1]), n = [h, c], h = t[0] + s * (r[0] - t[0]), c = t[1] + s * (r[1] - t[1]), o = [h, c]), [n, o];
|
|
3346
3469
|
}
|
|
3347
|
-
function
|
|
3348
|
-
const e = s[0], t = s[1], r = s[2], n =
|
|
3470
|
+
function sr(s) {
|
|
3471
|
+
const e = s[0], t = s[1], r = s[2], n = ae(0, e, t, r)[0], o = oe(e, t, r), l = Math.sqrt(o[0] * o[0] + o[1] * o[1]);
|
|
3349
3472
|
let h;
|
|
3350
|
-
if (l >
|
|
3351
|
-
const c =
|
|
3473
|
+
if (l > ne) {
|
|
3474
|
+
const c = De(e, t), d = e[0] - c[0], f = e[1] - c[1], M = 2 / I(e, t), y = -M * f, m = M * d, w = y * y - m * m, k = 2 * y * m, T = m * m - y * y, A = n[0] - c[0], R = n[1] - c[1];
|
|
3352
3475
|
h = [
|
|
3353
|
-
c[0] + w *
|
|
3354
|
-
c[1] +
|
|
3476
|
+
c[0] + w * A + k * R,
|
|
3477
|
+
c[1] + k * A + T * R
|
|
3355
3478
|
];
|
|
3356
3479
|
} else
|
|
3357
3480
|
h = [
|
|
@@ -3363,14 +3486,14 @@ function Ht(s) {
|
|
|
3363
3486
|
function U(s) {
|
|
3364
3487
|
return 0.3 * s;
|
|
3365
3488
|
}
|
|
3366
|
-
function
|
|
3367
|
-
const e = s.length, t = s[e - 3], r = s[e - 2], i = s[e - 1], o =
|
|
3489
|
+
function nr(s) {
|
|
3490
|
+
const e = s.length, t = s[e - 3], r = s[e - 2], i = s[e - 1], o = ae(0, t, r, i)[1], l = oe(t, r, i), h = Math.sqrt(l[0] * l[0] + l[1] * l[1]);
|
|
3368
3491
|
let c;
|
|
3369
|
-
if (h >
|
|
3370
|
-
const d =
|
|
3492
|
+
if (h > ne) {
|
|
3493
|
+
const d = De(r, i), f = i[0] - d[0], v = i[1] - d[1], y = 2 / I(r, i), m = -y * v, w = y * f, k = m * m - w * w, T = 2 * m * w, A = w * w - m * m, R = o[0] - d[0], le = o[1] - d[1];
|
|
3371
3494
|
c = [
|
|
3372
|
-
d[0] +
|
|
3373
|
-
d[1] + T * R +
|
|
3495
|
+
d[0] + k * R + T * le,
|
|
3496
|
+
d[1] + T * R + A * le
|
|
3374
3497
|
];
|
|
3375
3498
|
} else
|
|
3376
3499
|
c = [
|
|
@@ -3379,27 +3502,27 @@ function Qt(s) {
|
|
|
3379
3502
|
];
|
|
3380
3503
|
return c;
|
|
3381
3504
|
}
|
|
3382
|
-
function
|
|
3383
|
-
const r = [
|
|
3505
|
+
function Cr(s, e) {
|
|
3506
|
+
const r = [sr(e)];
|
|
3384
3507
|
for (let o = 0; o < e.length - 2; o++) {
|
|
3385
|
-
const l = e[o], h = e[o + 1], c = e[o + 2], d =
|
|
3508
|
+
const l = e[o], h = e[o + 1], c = e[o + 2], d = ae(s, l, h, c);
|
|
3386
3509
|
r.push(d[0], d[1]);
|
|
3387
3510
|
}
|
|
3388
|
-
const i =
|
|
3511
|
+
const i = nr(e);
|
|
3389
3512
|
r.push(i);
|
|
3390
3513
|
const n = [];
|
|
3391
3514
|
for (let o = 0; o < e.length - 1; o++) {
|
|
3392
3515
|
const l = e[o], h = e[o + 1];
|
|
3393
3516
|
n.push(l);
|
|
3394
|
-
for (let c = 0; c <
|
|
3395
|
-
const d = c /
|
|
3517
|
+
for (let c = 0; c < Se; c++) {
|
|
3518
|
+
const d = c / Se, f = Math.pow(1 - d, 3) * l[0] + 3 * d * Math.pow(1 - d, 2) * r[o * 2][0] + 3 * d * d * (1 - d) * r[o * 2 + 1][0] + Math.pow(d, 3) * h[0], v = Math.pow(1 - d, 3) * l[1] + 3 * d * Math.pow(1 - d, 2) * r[o * 2][1] + 3 * d * d * (1 - d) * r[o * 2 + 1][1] + Math.pow(d, 3) * h[1];
|
|
3396
3519
|
n.push([f, v]);
|
|
3397
3520
|
}
|
|
3398
3521
|
n.push(h);
|
|
3399
3522
|
}
|
|
3400
3523
|
return n;
|
|
3401
3524
|
}
|
|
3402
|
-
function
|
|
3525
|
+
function xr(s) {
|
|
3403
3526
|
if (s.length <= 2) return s;
|
|
3404
3527
|
const e = 2, t = [], r = s.length - e - 1;
|
|
3405
3528
|
t.push(s[0]);
|
|
@@ -3407,78 +3530,80 @@ function pr(s) {
|
|
|
3407
3530
|
for (let n = 0; n <= 1; n += 0.05) {
|
|
3408
3531
|
let o = 0, l = 0;
|
|
3409
3532
|
for (let h = 0; h <= e; h++) {
|
|
3410
|
-
const c =
|
|
3533
|
+
const c = or(h, n);
|
|
3411
3534
|
o += c * s[i + h][0], l += c * s[i + h][1];
|
|
3412
3535
|
}
|
|
3413
3536
|
t.push([o, l]);
|
|
3414
3537
|
}
|
|
3415
3538
|
return t.push(s[s.length - 1]), t;
|
|
3416
3539
|
}
|
|
3417
|
-
function
|
|
3540
|
+
function or(s, e) {
|
|
3418
3541
|
return s === 0 ? Math.pow(e - 1, 2) / 2 : s === 1 ? (-2 * Math.pow(e, 2) + 2 * e + 1) / 2 : s === 2 ? Math.pow(e, 2) / 2 : 0;
|
|
3419
3542
|
}
|
|
3420
|
-
function
|
|
3421
|
-
return
|
|
3543
|
+
function kr(s, e) {
|
|
3544
|
+
return Y(s, e);
|
|
3422
3545
|
}
|
|
3423
|
-
function
|
|
3424
|
-
return
|
|
3546
|
+
function Tr(s, e) {
|
|
3547
|
+
return Ne(s, e);
|
|
3425
3548
|
}
|
|
3426
|
-
function
|
|
3427
|
-
return !s || s.length < 3 ? [] :
|
|
3549
|
+
function Pr(s) {
|
|
3550
|
+
return !s || s.length < 3 ? [] : Re(s);
|
|
3428
3551
|
}
|
|
3429
|
-
function
|
|
3430
|
-
return !s || s.length < 3 ? [] :
|
|
3552
|
+
function Er(s) {
|
|
3553
|
+
return !s || s.length < 3 ? [] : Ie(s);
|
|
3431
3554
|
}
|
|
3432
|
-
function
|
|
3433
|
-
return !s || s.length < 2 ? [] :
|
|
3555
|
+
function Ir(s) {
|
|
3556
|
+
return !s || s.length < 2 ? [] : Ee(s);
|
|
3434
3557
|
}
|
|
3435
3558
|
export {
|
|
3436
|
-
|
|
3437
|
-
|
|
3438
|
-
|
|
3439
|
-
|
|
3440
|
-
|
|
3441
|
-
|
|
3442
|
-
|
|
3443
|
-
|
|
3444
|
-
|
|
3445
|
-
|
|
3446
|
-
|
|
3447
|
-
|
|
3448
|
-
|
|
3449
|
-
|
|
3559
|
+
yr as ArcgisTilesRenderer,
|
|
3560
|
+
K as EMERGENCY_RESOURCE_ICON_BY_ONTOLOGY_ID,
|
|
3561
|
+
mr as EMERGENCY_RESOURCE_ONTOLOGY_IDS,
|
|
3562
|
+
Se as FITTING_COUNT,
|
|
3563
|
+
ct as GisPlotArrow,
|
|
3564
|
+
C as GisPlotBase,
|
|
3565
|
+
ut as GisPlotCircle,
|
|
3566
|
+
st as GisPlotLine,
|
|
3567
|
+
it as GisPlotPoint,
|
|
3568
|
+
nt as GisPlotPolygon,
|
|
3569
|
+
ot as GisPlotRectangle,
|
|
3570
|
+
lt as GisPlotSector,
|
|
3571
|
+
ht as GisPlotText,
|
|
3572
|
+
zt as GroundDecalManager,
|
|
3450
3573
|
P as MaterialType,
|
|
3451
|
-
|
|
3452
|
-
|
|
3453
|
-
|
|
3574
|
+
I as MathDistance,
|
|
3575
|
+
De as Mid,
|
|
3576
|
+
B as OverlayManager,
|
|
3454
3577
|
u as OverlayType,
|
|
3455
|
-
|
|
3456
|
-
|
|
3457
|
-
|
|
3458
|
-
|
|
3459
|
-
|
|
3460
|
-
|
|
3461
|
-
|
|
3462
|
-
|
|
3463
|
-
|
|
3464
|
-
|
|
3465
|
-
|
|
3466
|
-
|
|
3467
|
-
|
|
3468
|
-
|
|
3469
|
-
|
|
3470
|
-
|
|
3471
|
-
|
|
3472
|
-
|
|
3473
|
-
|
|
3474
|
-
|
|
3475
|
-
|
|
3476
|
-
|
|
3477
|
-
|
|
3478
|
-
|
|
3479
|
-
|
|
3480
|
-
|
|
3481
|
-
|
|
3482
|
-
|
|
3483
|
-
|
|
3578
|
+
Wt as PlotPrimitiveBridge,
|
|
3579
|
+
vr as TerrainTilesRenderer,
|
|
3580
|
+
x as TerrainType,
|
|
3581
|
+
et as TileCustomMaterialPlugin,
|
|
3582
|
+
tr as TilesRenderer,
|
|
3583
|
+
wr as TilesRendererManager,
|
|
3584
|
+
ne as ZERO_TOLERANCE,
|
|
3585
|
+
Xt as computePlotBoundingBox,
|
|
3586
|
+
Tr as createAssaultDirectionArrow,
|
|
3587
|
+
Pr as createAttackArrow,
|
|
3588
|
+
Ir as createCurvedArrow,
|
|
3589
|
+
kr as createFineArrow,
|
|
3590
|
+
Er as createSwallowtailAttackArrow,
|
|
3591
|
+
pr as default,
|
|
3592
|
+
Vt as flyToPlotById,
|
|
3593
|
+
Sr as getAngleOfThreePoints,
|
|
3594
|
+
ee as getAzimuth,
|
|
3595
|
+
Or as getBaseLength,
|
|
3596
|
+
ae as getBisectorNormals,
|
|
3597
|
+
Cr as getCurvePoints,
|
|
3598
|
+
oe as getNormal,
|
|
3599
|
+
xr as getQBSplinePoints,
|
|
3600
|
+
br as getThirdPoint,
|
|
3601
|
+
ir as isClockWise,
|
|
3602
|
+
_r as parseColorToRGBA,
|
|
3603
|
+
yt as plotOrderToRenderOrder,
|
|
3604
|
+
Dt as resolveEmergencyResourceIcon,
|
|
3605
|
+
Mr as resolveOpacity,
|
|
3606
|
+
Lt as resolvePlotPointImageUrl,
|
|
3607
|
+
ft as sanitizePlotOrder,
|
|
3608
|
+
rr as wholeDistance
|
|
3484
3609
|
};
|