@vcmap/core 6.0.7 → 6.1.0-rc.2
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/cesium.d.ts +3 -0
- package/dist/index.d.ts +16 -1
- package/dist/index.js +16 -1
- package/dist/index.js.map +1 -1
- package/dist/ol.d.ts +8 -1
- package/dist/src/featureProvider/featureProviderSymbols.d.ts +5 -0
- package/dist/src/featureProvider/featureProviderSymbols.js +5 -1
- package/dist/src/featureProvider/featureProviderSymbols.js.map +1 -1
- package/dist/src/interaction/featureAtPixelInteraction.js +58 -62
- package/dist/src/interaction/featureAtPixelInteraction.js.map +1 -1
- package/dist/src/interaction/featureProviderInteraction.js +25 -13
- package/dist/src/interaction/featureProviderInteraction.js.map +1 -1
- package/dist/src/layer/cesium/sourceVectorContextSync.d.ts +27 -0
- package/dist/src/layer/cesium/sourceVectorContextSync.js +94 -0
- package/dist/src/layer/cesium/sourceVectorContextSync.js.map +1 -0
- package/dist/src/layer/cesium/vectorCesiumImpl.d.ts +4 -27
- package/dist/src/layer/cesium/vectorCesiumImpl.js +15 -107
- package/dist/src/layer/cesium/vectorCesiumImpl.js.map +1 -1
- package/dist/src/layer/cesium/vectorContext.d.ts +12 -1
- package/dist/src/layer/cesium/vectorContext.js +6 -0
- package/dist/src/layer/cesium/vectorContext.js.map +1 -1
- package/dist/src/layer/layerSymbols.js +1 -1
- package/dist/src/layer/layerSymbols.js.map +1 -1
- package/dist/src/layer/oblique/sourceObliqueSync.d.ts +18 -0
- package/dist/src/layer/oblique/sourceObliqueSync.js +319 -0
- package/dist/src/layer/oblique/sourceObliqueSync.js.map +1 -0
- package/dist/src/layer/oblique/vectorObliqueImpl.d.ts +2 -40
- package/dist/src/layer/oblique/vectorObliqueImpl.js +8 -283
- package/dist/src/layer/oblique/vectorObliqueImpl.js.map +1 -1
- package/dist/src/layer/vectorLayer.d.ts +10 -1
- package/dist/src/layer/vectorLayer.js +23 -1
- package/dist/src/layer/vectorLayer.js.map +1 -1
- package/dist/src/map/baseOLMap.js +8 -1
- package/dist/src/map/baseOLMap.js.map +1 -1
- package/dist/src/map/cesiumMap.d.ts +2 -0
- package/dist/src/map/cesiumMap.js +26 -1
- package/dist/src/map/cesiumMap.js.map +1 -1
- package/dist/src/map/vcsMap.d.ts +24 -12
- package/dist/src/map/vcsMap.js +92 -38
- package/dist/src/map/vcsMap.js.map +1 -1
- package/dist/src/ol/source/ClusterEnhancedVectorSource.d.ts +6 -4
- package/dist/src/ol/source/ClusterEnhancedVectorSource.js +4 -9
- package/dist/src/ol/source/ClusterEnhancedVectorSource.js.map +1 -1
- package/dist/src/ol/source/VcsCluster.d.ts +10 -10
- package/dist/src/ol/source/VcsCluster.js +23 -7
- package/dist/src/ol/source/VcsCluster.js.map +1 -1
- package/dist/src/util/clipping/clippingPolygonHelper.d.ts +7 -0
- package/dist/src/util/clipping/clippingPolygonHelper.js +53 -0
- package/dist/src/util/clipping/clippingPolygonHelper.js.map +1 -0
- package/dist/src/util/clipping/clippingPolygonObject.d.ts +59 -0
- package/dist/src/util/clipping/clippingPolygonObject.js +158 -0
- package/dist/src/util/clipping/clippingPolygonObject.js.map +1 -0
- package/dist/src/util/clipping/clippingPolygonObjectCollection.d.ts +18 -0
- package/dist/src/util/clipping/clippingPolygonObjectCollection.js +167 -0
- package/dist/src/util/clipping/clippingPolygonObjectCollection.js.map +1 -0
- package/dist/src/util/layerCollection.d.ts +11 -1
- package/dist/src/util/layerCollection.js +67 -12
- package/dist/src/util/layerCollection.js.map +1 -1
- package/dist/src/util/mapCollection.d.ts +16 -1
- package/dist/src/util/mapCollection.js +37 -3
- package/dist/src/util/mapCollection.js.map +1 -1
- package/dist/src/util/renderScreenshot.d.ts +9 -0
- package/dist/src/util/renderScreenshot.js +162 -0
- package/dist/src/util/renderScreenshot.js.map +1 -0
- package/dist/src/util/rotation.d.ts +30 -0
- package/dist/src/util/rotation.js +145 -0
- package/dist/src/util/rotation.js.map +1 -0
- package/dist/src/util/vcsTemplate.d.ts +7 -0
- package/dist/src/util/vcsTemplate.js +248 -0
- package/dist/src/util/vcsTemplate.js.map +1 -0
- package/dist/src/vcsApp.d.ts +7 -0
- package/dist/src/vcsApp.js +29 -0
- package/dist/src/vcsApp.js.map +1 -1
- package/dist/src/vcsModule.d.ts +6 -2
- package/dist/src/vcsModule.js.map +1 -1
- package/dist/src/vectorCluster/vectorClusterCesiumContext.d.ts +18 -0
- package/dist/src/{layer/cesium/clusterContext.js → vectorCluster/vectorClusterCesiumContext.js} +28 -42
- package/dist/src/vectorCluster/vectorClusterCesiumContext.js.map +1 -0
- package/dist/src/vectorCluster/vectorClusterGroup.d.ts +96 -0
- package/dist/src/vectorCluster/vectorClusterGroup.js +320 -0
- package/dist/src/vectorCluster/vectorClusterGroup.js.map +1 -0
- package/dist/src/vectorCluster/vectorClusterGroupCesiumImpl.d.ts +20 -0
- package/dist/src/vectorCluster/vectorClusterGroupCesiumImpl.js +115 -0
- package/dist/src/vectorCluster/vectorClusterGroupCesiumImpl.js.map +1 -0
- package/dist/src/vectorCluster/vectorClusterGroupCollection.d.ts +19 -0
- package/dist/src/vectorCluster/vectorClusterGroupCollection.js +37 -0
- package/dist/src/vectorCluster/vectorClusterGroupCollection.js.map +1 -0
- package/dist/src/vectorCluster/vectorClusterGroupImpl.d.ts +31 -0
- package/dist/src/vectorCluster/vectorClusterGroupImpl.js +76 -0
- package/dist/src/vectorCluster/vectorClusterGroupImpl.js.map +1 -0
- package/dist/src/vectorCluster/vectorClusterGroupObliqueImpl.d.ts +17 -0
- package/dist/src/vectorCluster/vectorClusterGroupObliqueImpl.js +62 -0
- package/dist/src/vectorCluster/vectorClusterGroupObliqueImpl.js.map +1 -0
- package/dist/src/vectorCluster/vectorClusterGroupOpenlayersImpl.d.ts +17 -0
- package/dist/src/vectorCluster/vectorClusterGroupOpenlayersImpl.js +62 -0
- package/dist/src/vectorCluster/vectorClusterGroupOpenlayersImpl.js.map +1 -0
- package/dist/src/vectorCluster/vectorClusterStyleItem.d.ts +110 -0
- package/dist/src/vectorCluster/vectorClusterStyleItem.js +374 -0
- package/dist/src/vectorCluster/vectorClusterStyleItem.js.map +1 -0
- package/dist/src/vectorCluster/vectorClusterSymbols.d.ts +1 -0
- package/dist/src/vectorCluster/vectorClusterSymbols.js +3 -0
- package/dist/src/vectorCluster/vectorClusterSymbols.js.map +1 -0
- package/index.ts +42 -1
- package/package.json +3 -1
- package/src/cesium/cesium.d.ts +3 -0
- package/src/featureProvider/featureProviderSymbols.ts +6 -1
- package/src/interaction/featureAtPixelInteraction.ts +109 -84
- package/src/interaction/featureProviderInteraction.ts +42 -28
- package/src/layer/cesium/sourceVectorContextSync.ts +134 -0
- package/src/layer/cesium/vcsTile/vcsDebugTile.ts +1 -1
- package/src/layer/cesium/vcsTile/vcsVectorTile.ts +1 -1
- package/src/layer/cesium/vectorCesiumImpl.ts +30 -144
- package/src/layer/cesium/vectorContext.ts +17 -1
- package/src/layer/layerSymbols.ts +1 -1
- package/src/layer/oblique/sourceObliqueSync.ts +436 -0
- package/src/layer/oblique/vectorObliqueImpl.ts +11 -397
- package/src/layer/vectorLayer.ts +35 -2
- package/src/map/baseOLMap.ts +8 -1
- package/src/map/cesiumMap.ts +36 -3
- package/src/map/vcsMap.ts +121 -47
- package/src/ol/ol.d.ts +8 -1
- package/src/ol/source/{ClusterEnhancedVectorSource.js → ClusterEnhancedVectorSource.ts} +7 -10
- package/src/ol/source/VcsCluster.ts +58 -0
- package/src/util/clipping/clippingPolygonHelper.ts +86 -0
- package/src/util/clipping/clippingPolygonObject.ts +223 -0
- package/src/util/clipping/clippingPolygonObjectCollection.ts +249 -0
- package/src/util/layerCollection.ts +90 -12
- package/src/util/mapCollection.ts +53 -2
- package/src/util/renderScreenshot.ts +193 -0
- package/src/util/rotation.ts +215 -0
- package/src/util/vcsTemplate.ts +373 -0
- package/src/vcsApp.ts +65 -0
- package/src/vcsModule.ts +6 -2
- package/src/vectorCluster/vectorClusterCesiumContext.ts +123 -0
- package/src/vectorCluster/vectorClusterGroup.ts +463 -0
- package/src/vectorCluster/vectorClusterGroupCesiumImpl.ts +176 -0
- package/src/vectorCluster/vectorClusterGroupCollection.ts +43 -0
- package/src/vectorCluster/vectorClusterGroupImpl.ts +107 -0
- package/src/vectorCluster/vectorClusterGroupObliqueImpl.ts +84 -0
- package/src/vectorCluster/vectorClusterGroupOpenlayersImpl.ts +81 -0
- package/src/vectorCluster/vectorClusterStyleItem.ts +490 -0
- package/src/vectorCluster/vectorClusterSymbols.ts +2 -0
- package/dist/src/layer/cesium/clusterContext.d.ts +0 -20
- package/dist/src/layer/cesium/clusterContext.js.map +0 -1
- package/src/layer/cesium/clusterContext.ts +0 -140
- package/src/ol/source/VcsCluster.js +0 -37
|
@@ -1,12 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
PrimitiveCollection,
|
|
4
|
-
type Scene,
|
|
5
|
-
type SplitDirection,
|
|
6
|
-
} from '@vcmap-cesium/engine';
|
|
1
|
+
import { PrimitiveCollection, type SplitDirection } from '@vcmap-cesium/engine';
|
|
7
2
|
import type VectorSource from 'ol/source/Vector.js';
|
|
8
|
-
import type { EventsKey } from 'ol/events.js';
|
|
9
|
-
import type { Feature } from 'ol/index.js';
|
|
10
3
|
import { vcsLayerName } from '../layerSymbols.js';
|
|
11
4
|
import LayerImplementation from '../layerImplementation.js';
|
|
12
5
|
import { synchronizeFeatureVisibilityWithSource } from '../vectorHelpers.js';
|
|
@@ -18,6 +11,10 @@ import type StyleItem from '../../style/styleItem.js';
|
|
|
18
11
|
import type FeatureVisibility from '../featureVisibility.js';
|
|
19
12
|
import type GlobalHider from '../globalHider.js';
|
|
20
13
|
import VectorContext from './vectorContext.js';
|
|
14
|
+
import {
|
|
15
|
+
createSourceVectorContextSync,
|
|
16
|
+
SourceVectorContextSync,
|
|
17
|
+
} from './sourceVectorContextSync.js';
|
|
21
18
|
|
|
22
19
|
/**
|
|
23
20
|
* represents a specific vector layer for cesium.
|
|
@@ -42,21 +39,11 @@ class VectorCesiumImpl
|
|
|
42
39
|
|
|
43
40
|
private _featureVisibilityListeners: (() => void)[] = [];
|
|
44
41
|
|
|
45
|
-
|
|
46
|
-
private _removeVectorPropertiesChangeHandler = (): void => {};
|
|
47
|
-
|
|
48
|
-
protected _rootCollection: PrimitiveCollection;
|
|
42
|
+
private _rootCollection: PrimitiveCollection;
|
|
49
43
|
|
|
50
|
-
private
|
|
51
|
-
|
|
52
|
-
/**
|
|
53
|
-
* A set of ol.Features to add once the map is back to cesium
|
|
54
|
-
*/
|
|
55
|
-
private _featureToAdd: Set<Feature> = new Set();
|
|
44
|
+
private _context: VectorContext | null = null;
|
|
56
45
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
private _scene: Scene | undefined = undefined;
|
|
46
|
+
private _sourceVectorContextSync: SourceVectorContextSync | undefined;
|
|
60
47
|
|
|
61
48
|
globalHider: GlobalHider | undefined;
|
|
62
49
|
|
|
@@ -74,52 +61,21 @@ class VectorCesiumImpl
|
|
|
74
61
|
this.globalHider = options.globalHider;
|
|
75
62
|
}
|
|
76
63
|
|
|
77
|
-
private _addListeners(): void {
|
|
78
|
-
this._olListeners.push(
|
|
79
|
-
this.source.on('addfeature', (event) => {
|
|
80
|
-
this._addFeature(event.feature as Feature).catch(() => {
|
|
81
|
-
this.getLogger().error('failed to convert feature');
|
|
82
|
-
});
|
|
83
|
-
}),
|
|
84
|
-
);
|
|
85
|
-
|
|
86
|
-
this._olListeners.push(
|
|
87
|
-
this.source.on('removefeature', (event) => {
|
|
88
|
-
this._removeFeature(event.feature as Feature);
|
|
89
|
-
}),
|
|
90
|
-
);
|
|
91
|
-
|
|
92
|
-
this._olListeners.push(
|
|
93
|
-
this.source.on('changefeature', (event) => {
|
|
94
|
-
this._featureChanged(event.feature as Feature).catch((_e) => {
|
|
95
|
-
this.getLogger().error('failed to convert feature');
|
|
96
|
-
});
|
|
97
|
-
}),
|
|
98
|
-
);
|
|
99
|
-
|
|
100
|
-
this._removeVectorPropertiesChangeHandler =
|
|
101
|
-
this.vectorProperties.propertyChanged.addEventListener(
|
|
102
|
-
this.refresh.bind(this),
|
|
103
|
-
);
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
protected _setupContext(cesiumMap: CesiumMap): Promise<void> {
|
|
107
|
-
const rootCollection = this._rootCollection;
|
|
108
|
-
this._context = new VectorContext(
|
|
109
|
-
cesiumMap,
|
|
110
|
-
rootCollection,
|
|
111
|
-
this.splitDirection,
|
|
112
|
-
);
|
|
113
|
-
cesiumMap.addPrimitiveCollection(rootCollection);
|
|
114
|
-
return Promise.resolve();
|
|
115
|
-
}
|
|
116
|
-
|
|
117
64
|
async initialize(): Promise<void> {
|
|
118
65
|
if (!this.initialized) {
|
|
119
|
-
this.
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
66
|
+
this._context = new VectorContext(
|
|
67
|
+
this.map,
|
|
68
|
+
this._rootCollection,
|
|
69
|
+
this.splitDirection,
|
|
70
|
+
);
|
|
71
|
+
this.map.addPrimitiveCollection(this._rootCollection);
|
|
72
|
+
this._sourceVectorContextSync = createSourceVectorContextSync(
|
|
73
|
+
this.source,
|
|
74
|
+
this._context,
|
|
75
|
+
this.map.getScene()!,
|
|
76
|
+
this.style.style,
|
|
77
|
+
this.vectorProperties,
|
|
78
|
+
);
|
|
123
79
|
}
|
|
124
80
|
await super.initialize();
|
|
125
81
|
if (this.splitDirection) {
|
|
@@ -127,62 +83,18 @@ class VectorCesiumImpl
|
|
|
127
83
|
}
|
|
128
84
|
}
|
|
129
85
|
|
|
130
|
-
private _addFeatures(features: Feature[]): void {
|
|
131
|
-
// TODO we should make this non-blocking to better handle larger data sets check in RIWA Impl
|
|
132
|
-
features.forEach((f) => {
|
|
133
|
-
this._addFeature(f).catch((err) => {
|
|
134
|
-
this.getLogger().error('failed to convert feature', f, err);
|
|
135
|
-
});
|
|
136
|
-
});
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
/**
|
|
140
|
-
* converts a feature and adds the associated primitives to the collection of primitives
|
|
141
|
-
*/
|
|
142
|
-
private async _addFeature(feature: Feature): Promise<void> {
|
|
143
|
-
if (this.active) {
|
|
144
|
-
// XXX cluster check here? or on init?
|
|
145
|
-
await this._context!.addFeature(
|
|
146
|
-
feature,
|
|
147
|
-
this.style.style,
|
|
148
|
-
this.vectorProperties,
|
|
149
|
-
this._scene as Scene,
|
|
150
|
-
);
|
|
151
|
-
} else {
|
|
152
|
-
this._featureToAdd.add(feature);
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
|
|
156
86
|
/**
|
|
157
87
|
* Forces a complete re-render of all features.
|
|
158
88
|
*/
|
|
159
89
|
refresh(): void {
|
|
160
|
-
this.
|
|
161
|
-
this._addFeatures(this.source.getFeatures());
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
/**
|
|
165
|
-
* removes the primitive of the specified feature
|
|
166
|
-
*/
|
|
167
|
-
private _removeFeature(feature: Feature): void {
|
|
168
|
-
this._context?.removeFeature(feature);
|
|
169
|
-
this._featureToAdd.delete(feature);
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
/**
|
|
173
|
-
* called when a features property have changed
|
|
174
|
-
*/
|
|
175
|
-
private async _featureChanged(feature: Feature): Promise<void> {
|
|
176
|
-
this._featureToAdd.delete(feature);
|
|
177
|
-
await this._addFeature(feature);
|
|
90
|
+
this._sourceVectorContextSync?.refresh();
|
|
178
91
|
}
|
|
179
92
|
|
|
180
93
|
async activate(): Promise<void> {
|
|
181
94
|
if (!this.active) {
|
|
182
95
|
await super.activate();
|
|
183
96
|
if (this.active) {
|
|
184
|
-
this.
|
|
185
|
-
this._featureToAdd.clear();
|
|
97
|
+
this._sourceVectorContextSync?.activate();
|
|
186
98
|
this._rootCollection.show = true;
|
|
187
99
|
if (this._featureVisibilityListeners.length === 0) {
|
|
188
100
|
this._featureVisibilityListeners =
|
|
@@ -198,6 +110,7 @@ class VectorCesiumImpl
|
|
|
198
110
|
|
|
199
111
|
deactivate(): void {
|
|
200
112
|
super.deactivate();
|
|
113
|
+
this._sourceVectorContextSync?.deactivate();
|
|
201
114
|
this._rootCollection.show = false;
|
|
202
115
|
this._featureVisibilityListeners.forEach((cb) => {
|
|
203
116
|
cb();
|
|
@@ -208,11 +121,10 @@ class VectorCesiumImpl
|
|
|
208
121
|
updateStyle(style: StyleItem, silent?: boolean): void {
|
|
209
122
|
this.style = style;
|
|
210
123
|
if (this.initialized && !silent) {
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
});
|
|
124
|
+
this.source
|
|
125
|
+
.getFeatures()
|
|
126
|
+
.filter((f) => !f.getStyle())
|
|
127
|
+
.forEach((f) => f.changed());
|
|
216
128
|
}
|
|
217
129
|
}
|
|
218
130
|
|
|
@@ -223,43 +135,17 @@ class VectorCesiumImpl
|
|
|
223
135
|
}
|
|
224
136
|
}
|
|
225
137
|
|
|
226
|
-
protected _destroyCollection(): void {
|
|
227
|
-
this.map.removePrimitiveCollection(this._rootCollection);
|
|
228
|
-
}
|
|
229
|
-
|
|
230
138
|
destroy(): void {
|
|
231
139
|
if (this.initialized) {
|
|
140
|
+
this._sourceVectorContextSync?.destroy();
|
|
232
141
|
this._context?.destroy();
|
|
233
|
-
this.
|
|
142
|
+
this.map.removePrimitiveCollection(this._rootCollection);
|
|
234
143
|
}
|
|
235
144
|
this._context = null;
|
|
236
|
-
this._scene = undefined;
|
|
237
|
-
this._removeVectorPropertiesChangeHandler();
|
|
238
|
-
this._olListeners.forEach((listener) => {
|
|
239
|
-
unByKey(listener);
|
|
240
|
-
});
|
|
241
|
-
this._olListeners = [];
|
|
242
|
-
this._featureToAdd.clear();
|
|
243
145
|
this._featureVisibilityListeners.forEach((cb) => {
|
|
244
146
|
cb();
|
|
245
147
|
});
|
|
246
148
|
this._featureVisibilityListeners = [];
|
|
247
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
248
|
-
// @ts-ignore
|
|
249
|
-
this.source = null;
|
|
250
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
251
|
-
// @ts-ignore
|
|
252
|
-
this.vectorProperties = null;
|
|
253
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
254
|
-
// @ts-ignore
|
|
255
|
-
this.featureVisibility = null;
|
|
256
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
257
|
-
// @ts-ignore
|
|
258
|
-
this.style = null;
|
|
259
|
-
this.globalHider = undefined;
|
|
260
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
261
|
-
// @ts-ignore
|
|
262
|
-
this._rootCollection = null;
|
|
263
149
|
super.destroy();
|
|
264
150
|
}
|
|
265
151
|
}
|
|
@@ -124,6 +124,12 @@ export function setupScalingPrimitiveCollection(
|
|
|
124
124
|
});
|
|
125
125
|
}
|
|
126
126
|
|
|
127
|
+
/**
|
|
128
|
+
* The context for vector rendering in cesium.
|
|
129
|
+
* Creates 1 to N primitives / models / billboards / labels for each feature
|
|
130
|
+
* added to the context depending on its style & vector properties.
|
|
131
|
+
* Uses the feature converters convert function under the hood to create the primitives.
|
|
132
|
+
*/
|
|
127
133
|
export interface CesiumVectorContext {
|
|
128
134
|
addFeature(
|
|
129
135
|
feature: Feature,
|
|
@@ -131,15 +137,19 @@ export interface CesiumVectorContext {
|
|
|
131
137
|
vectorProperties: VectorProperties,
|
|
132
138
|
scene: Scene,
|
|
133
139
|
): Promise<void>;
|
|
140
|
+
hasFeature(feature: Feature): boolean;
|
|
134
141
|
removeFeature(feature: Feature): void;
|
|
135
|
-
updateSplitDirection(splitDirection: SplitDirection): void;
|
|
136
142
|
clear(): void;
|
|
143
|
+
destroy(): void;
|
|
137
144
|
}
|
|
138
145
|
|
|
139
146
|
type ConvertedItemIndex = { type: 'primitive' | 'scaled'; index: number };
|
|
140
147
|
|
|
141
148
|
type ConvertedIndices = { primitive?: number; scaled?: number };
|
|
142
149
|
|
|
150
|
+
/**
|
|
151
|
+
* The generic implementation of the vector context for Cesium
|
|
152
|
+
*/
|
|
143
153
|
export default class VectorContext implements CesiumVectorContext {
|
|
144
154
|
primitives = new PrimitiveCollection();
|
|
145
155
|
|
|
@@ -359,6 +369,12 @@ export default class VectorContext implements CesiumVectorContext {
|
|
|
359
369
|
}
|
|
360
370
|
}
|
|
361
371
|
|
|
372
|
+
hasFeature(feature: Feature): boolean {
|
|
373
|
+
return (
|
|
374
|
+
this._featureItems.has(feature) || this._convertingFeatures.has(feature)
|
|
375
|
+
);
|
|
376
|
+
}
|
|
377
|
+
|
|
362
378
|
removeFeature(feature: Feature): void {
|
|
363
379
|
this._convertingFeatures.get(feature)?.(false);
|
|
364
380
|
this._convertingFeatures.delete(feature);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Symbol to declare a layers name on its visualizations, e.g. ol.layer.Layer, Cesium.Cesium3DTileset*
|
|
3
3
|
*/
|
|
4
|
-
|
|
4
|
+
// eslint-disable-next-line import/prefer-default-export
|
|
5
5
|
export const vcsLayerName: unique symbol = Symbol('vcsLayerName');
|