@vcmap/core 5.0.0-rc.10 → 5.0.0-rc.13

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.
Files changed (129) hide show
  1. package/index.d.ts +201 -125
  2. package/index.js +2 -3
  3. package/package.json +6 -2
  4. package/src/category/category.js +21 -5
  5. package/src/classRegistry.js +0 -6
  6. package/src/context.js +0 -1
  7. package/src/featureProvider/abstractFeatureProvider.js +0 -1
  8. package/src/featureProvider/wmsFeatureProvider.js +0 -1
  9. package/src/interaction/abstractInteraction.js +0 -1
  10. package/src/interaction/interactionChain.js +0 -1
  11. package/src/interaction/interactionType.js +1 -5
  12. package/src/layer/cesium/cesiumTilesetCesiumImpl.js +2 -3
  13. package/src/layer/cesium/dataSourceCesiumImpl.js +0 -1
  14. package/src/layer/cesium/openStreetMapCesiumImpl.js +0 -1
  15. package/src/layer/cesium/rasterLayerCesiumImpl.js +0 -1
  16. package/src/layer/cesium/singleImageCesiumImpl.js +0 -1
  17. package/src/layer/cesium/terrainCesiumImpl.js +0 -1
  18. package/src/layer/cesium/tmsCesiumImpl.js +0 -1
  19. package/src/layer/cesium/vectorCesiumImpl.js +3 -4
  20. package/src/layer/cesium/vectorRasterTileCesiumImpl.js +0 -1
  21. package/src/layer/cesium/vectorTileImageryProvider.js +0 -1
  22. package/src/layer/cesium/wmsCesiumImpl.js +0 -1
  23. package/src/layer/cesium/wmtsCesiumImpl.js +0 -1
  24. package/src/layer/cesiumTilesetLayer.js +0 -1
  25. package/src/layer/czmlLayer.js +0 -1
  26. package/src/layer/dataSourceLayer.js +25 -16
  27. package/src/layer/featureLayer.js +10 -1
  28. package/src/layer/featureStoreLayer.js +1 -1
  29. package/src/layer/featureStoreLayerState.js +0 -1
  30. package/src/layer/featureVisibility.js +3 -1
  31. package/src/layer/geojsonHelpers.js +0 -4
  32. package/src/layer/geojsonLayer.js +0 -1
  33. package/src/layer/globalHider.js +7 -21
  34. package/src/layer/layer.js +84 -38
  35. package/src/layer/layerImplementation.js +0 -1
  36. package/src/layer/layerState.js +0 -1
  37. package/src/layer/oblique/vectorObliqueImpl.js +1 -3
  38. package/src/layer/openStreetMapLayer.js +0 -1
  39. package/src/layer/openlayers/layerOpenlayersImpl.js +0 -1
  40. package/src/layer/openlayers/openStreetMapOpenlayersImpl.js +0 -1
  41. package/src/layer/openlayers/singleImageOpenlayersImpl.js +0 -1
  42. package/src/layer/openlayers/tileDebugOpenlayersImpl.js +0 -1
  43. package/src/layer/openlayers/tmsOpenlayersImpl.js +0 -1
  44. package/src/layer/openlayers/vectorOpenlayersImpl.js +2 -3
  45. package/src/layer/openlayers/vectorTileOpenlayersImpl.js +0 -1
  46. package/src/layer/openlayers/wmsOpenlayersImpl.js +0 -1
  47. package/src/layer/openlayers/wmtsOpenlayersImpl.js +0 -1
  48. package/src/layer/pointCloudLayer.js +0 -1
  49. package/src/layer/rasterLayer.js +0 -2
  50. package/src/layer/singleImageLayer.js +0 -1
  51. package/src/layer/terrainLayer.js +0 -1
  52. package/src/layer/tileProvider/mvtTileProvider.js +21 -2
  53. package/src/layer/tileProvider/staticGeojsonTileProvider.js +0 -1
  54. package/src/layer/tileProvider/tileProvider.js +27 -1
  55. package/src/layer/tileProvider/urlTemplateTileProvider.js +26 -6
  56. package/src/layer/tmsLayer.js +0 -1
  57. package/src/layer/vectorLayer.js +0 -1
  58. package/src/layer/vectorProperties.js +0 -1
  59. package/src/layer/vectorTileLayer.js +45 -13
  60. package/src/layer/wfsLayer.js +0 -1
  61. package/src/layer/wmsLayer.js +0 -1
  62. package/src/layer/wmtsLayer.js +0 -1
  63. package/src/map/baseOLMap.js +0 -1
  64. package/src/map/cameraLimiter.js +0 -1
  65. package/src/map/cesiumMap.js +0 -1
  66. package/src/map/mapState.js +0 -1
  67. package/src/map/obliqueMap.js +0 -1
  68. package/src/map/openlayersMap.js +0 -1
  69. package/src/map/vcsMap.js +6 -2
  70. package/src/oblique/helpers.js +0 -3
  71. package/src/oblique/obliqueCollection.js +0 -1
  72. package/src/oblique/obliqueDataSet.js +0 -2
  73. package/src/oblique/obliqueImage.js +0 -1
  74. package/src/oblique/obliqueImageMeta.js +0 -1
  75. package/src/oblique/obliqueProvider.js +0 -1
  76. package/src/oblique/obliqueView.js +0 -1
  77. package/src/oblique/obliqueViewDirection.js +0 -3
  78. package/src/ol/render/canvas/canvasTileRenderer.js +0 -1
  79. package/src/style/declarativeStyleItem.js +0 -1
  80. package/src/style/shapesCategory.js +0 -2
  81. package/src/style/styleHelpers.js +0 -11
  82. package/src/style/styleItem.js +0 -1
  83. package/src/style/vectorStyleItem.js +0 -4
  84. package/src/util/clipping/clippingObject.js +0 -2
  85. package/src/util/clipping/clippingObjectManager.js +0 -1
  86. package/src/util/clipping/clippingPlaneHelper.js +0 -4
  87. package/src/util/collection.js +15 -3
  88. package/src/util/extent.js +0 -1
  89. package/src/util/indexedCollection.js +0 -1
  90. package/src/util/layerCollection.js +71 -6
  91. package/src/util/locale.js +1 -42
  92. package/src/util/mapCollection.js +29 -14
  93. package/src/util/overrideCollection.js +8 -9
  94. package/src/util/projection.js +0 -5
  95. package/src/util/viewpoint.js +0 -4
  96. package/src/vcsApp.js +53 -0
  97. package/src/vcsEvent.js +0 -1
  98. package/tests/data/buildings/tileset.json +428 -0
  99. package/tests/data/dynamicPointCzml.json +64 -0
  100. package/tests/data/oblique/imageData/imagev34.json +352 -0
  101. package/tests/data/oblique/imageData/imagev35.json +54 -0
  102. package/tests/data/oblique/imageData/imagev35PerImageSize.json +53 -0
  103. package/tests/data/oblique/tiledImageData/12/2199/1342.json +1 -0
  104. package/tests/data/oblique/tiledImageData/12/2199/1343.json +1 -0
  105. package/tests/data/oblique/tiledImageData/12/2199/1344.json +1 -0
  106. package/tests/data/oblique/tiledImageData/12/2200/1342.json +1 -0
  107. package/tests/data/oblique/tiledImageData/12/2200/1343.json +1 -0
  108. package/tests/data/oblique/tiledImageData/12/2200/1344.json +1 -0
  109. package/tests/data/oblique/tiledImageData/12/2201/1342.json +1 -0
  110. package/tests/data/oblique/tiledImageData/12/2201/1343.json +1 -0
  111. package/tests/data/oblique/tiledImageData/12/2201/1344.json +1 -0
  112. package/tests/data/oblique/tiledImageData/image.json +1 -0
  113. package/tests/data/terrain/13/8800/6485.terrain +0 -0
  114. package/tests/data/terrain/13/8800/6486.terrain +0 -0
  115. package/tests/data/terrain/13/8801/6485.terrain +0 -0
  116. package/tests/data/terrain/13/8801/6486.terrain +0 -0
  117. package/tests/data/terrain/layer.json +136 -0
  118. package/tests/data/testGeoJSON.json +161 -0
  119. package/tests/data/tile.pbf +0 -0
  120. package/tests/unit/helpers/cesiumHelpers.js +272 -0
  121. package/tests/unit/helpers/getFileNameFromUrl.js +12 -0
  122. package/tests/unit/helpers/helpers.js +11 -0
  123. package/tests/unit/helpers/imageHelpers.js +20 -0
  124. package/tests/unit/helpers/importJSON.js +15 -0
  125. package/tests/unit/helpers/obliqueData.js +76 -0
  126. package/tests/unit/helpers/obliqueHelpers.js +112 -0
  127. package/tests/unit/helpers/openlayersHelpers.js +22 -0
  128. package/tests/unit/helpers/terrain/terrainData.js +46 -0
  129. package/src/util/dateTime.js +0 -60
@@ -69,7 +69,6 @@ function synchronizeFeatureVisibility(featureVisibility, globalHider, feature) {
69
69
  /**
70
70
  * VectorTileLayer Layer for tiled vector Data. Can be connected to data with a TileProvider
71
71
  * @class
72
- * @export
73
72
  * @extends {FeatureLayer}
74
73
  * @api stable
75
74
  */
@@ -139,6 +138,9 @@ class VectorTileLayer extends FeatureLayer {
139
138
  this.tileProvider = options.tileProvider instanceof TileProvider ? // XXX this now throws if not passing in a tileProvider.
140
139
  options.tileProvider :
141
140
  getObjectFromClassRegistry(tileProviderClassRegistry, options.tileProvider);
141
+ if (this.tileProvider) {
142
+ this.tileProvider.locale = this.locale;
143
+ }
142
144
 
143
145
  /**
144
146
  * @type {number|undefined}
@@ -156,7 +158,7 @@ class VectorTileLayer extends FeatureLayer {
156
158
  * @type {Array<Function>}
157
159
  * @private
158
160
  */
159
- this._featureVisibilityListener = [];
161
+ this._featureVisibilityListeners = [];
160
162
 
161
163
  /**
162
164
  * @type {Function}
@@ -178,6 +180,25 @@ class VectorTileLayer extends FeatureLayer {
178
180
  this._styleZIndex = 0;
179
181
  }
180
182
 
183
+ /**
184
+ * returns the currently set locale. Can be used to provide locale specific URLs.
185
+ * @type {string}
186
+ */
187
+ get locale() {
188
+ return super.locale;
189
+ }
190
+
191
+ /**
192
+ * sets the locale and reloads the layer the if the URL is a locale aware Object.
193
+ * @param {string} value
194
+ */
195
+ set locale(value) {
196
+ if (this.tileProvider) {
197
+ this.tileProvider.locale = super.locale;
198
+ }
199
+ super.locale = value;
200
+ }
201
+
181
202
  /**
182
203
  * initializes the layer, can be used to defer loading
183
204
  * @returns {Promise<void>}
@@ -255,15 +276,24 @@ class VectorTileLayer extends FeatureLayer {
255
276
  }
256
277
 
257
278
  /**
258
- *
259
- * @returns {Array<Function>}
279
+ * @param {import("@vcmap/core").GlobalHider} globalHider
280
+ */
281
+ setGlobalHider(globalHider) {
282
+ super.setGlobalHider(globalHider);
283
+ this._setupFeatureVisibilityHandlers();
284
+ }
285
+
286
+ /**
287
+ * Sets up listeners for featureVisibility and global hider
260
288
  * @private
261
289
  */
262
290
  _setupFeatureVisibilityHandlers() {
263
291
  if (!this.tileProvider.trackFeaturesToTiles) {
264
- return [];
292
+ return;
265
293
  }
266
- return [
294
+ this._featureVisibilityListeners.forEach((cb) => { cb(); });
295
+
296
+ this._featureVisibilityListeners = [
267
297
  this.featureVisibility.changed.addEventListener(({ action, ids }) => {
268
298
  const tileIdsChanged = new Set();
269
299
  ids.forEach((id) => {
@@ -290,8 +320,10 @@ class VectorTileLayer extends FeatureLayer {
290
320
  });
291
321
  this.updateTiles([...tileIdsChanged]);
292
322
  }),
323
+ ];
293
324
 
294
- this.globalHider.changed.addEventListener(({ action, ids }) => {
325
+ if (this.globalHider) {
326
+ this._featureVisibilityListeners.push(this.globalHider.changed.addEventListener(({ action, ids }) => {
295
327
  const tileIdsChanged = new Set();
296
328
  ids.forEach((id) => {
297
329
  const tileIds = this.tileProvider.featureIdToTileIds.get(id);
@@ -312,8 +344,8 @@ class VectorTileLayer extends FeatureLayer {
312
344
  }
313
345
  });
314
346
  this.updateTiles([...tileIdsChanged]);
315
- }),
316
- ];
347
+ }));
348
+ }
317
349
  }
318
350
 
319
351
  /**
@@ -401,8 +433,8 @@ class VectorTileLayer extends FeatureLayer {
401
433
  */
402
434
  async activate() {
403
435
  await super.activate();
404
- this._featureVisibilityListener = this._setupFeatureVisibilityHandlers();
405
- if (this.tileProvider.trackFeaturesToTiles) {
436
+ this._setupFeatureVisibilityHandlers();
437
+ if (this.tileProvider.trackFeaturesToTiles && this.globalHider) {
406
438
  this.tileProvider.forEachFeature((feature) => {
407
439
  synchronizeFeatureVisibility(this.featureVisibility, this.globalHider, feature);
408
440
  });
@@ -415,7 +447,7 @@ class VectorTileLayer extends FeatureLayer {
415
447
  */
416
448
  deactivate() {
417
449
  super.deactivate();
418
- this._featureVisibilityListener.forEach((cb) => { cb(); });
450
+ this._featureVisibilityListeners.forEach((cb) => { cb(); });
419
451
  }
420
452
 
421
453
  /**
@@ -423,7 +455,7 @@ class VectorTileLayer extends FeatureLayer {
423
455
  * @api
424
456
  */
425
457
  destroy() {
426
- this._featureVisibilityListener.forEach((cb) => { cb(); });
458
+ this._featureVisibilityListeners.forEach((cb) => { cb(); });
427
459
  super.destroy();
428
460
  this._tileLoadEventListener();
429
461
  if (this.featureProvider) {
@@ -16,7 +16,6 @@ import { requestJson } from '../util/fetch.js';
16
16
  /**
17
17
  * WfsLayer VectorLayer Layer
18
18
  * @class
19
- * @export
20
19
  * @extends {VectorLayer}
21
20
  * @api
22
21
  */
@@ -32,7 +32,6 @@ import { layerClassRegistry } from '../classRegistry.js';
32
32
  /**
33
33
  * WmsLayer layer for Cesium and OpenlayersMap
34
34
  * @class
35
- * @export
36
35
  * @extends {RasterLayer}
37
36
  * @api stable
38
37
  */
@@ -60,7 +60,6 @@ function getMatrixIds(matrixIds, maxLevel, prefix) {
60
60
  /**
61
61
  * WmtsLayer layer
62
62
  * @class
63
- * @export
64
63
  * @extends {RasterLayer}
65
64
  * @api stable
66
65
  */
@@ -36,7 +36,6 @@ export function ensureLayerInCollection(layers, layer, layerCollection) {
36
36
  * @class
37
37
  * @abstract
38
38
  * @api
39
- * @export
40
39
  * @extends {VcsMap}
41
40
  */
42
41
  class BaseOLMap extends VcsMap {
@@ -26,7 +26,6 @@ export const CameraLimiterMode = {
26
26
  /**
27
27
  * Can limit a Cesium.Cameras position based on absolute height or distance to a given terrain
28
28
  * @class
29
- * @export
30
29
  * @api
31
30
  */
32
31
  class CameraLimiter {
@@ -202,7 +202,6 @@ ExperimentalFeatures.enableModelExperimental = false; // TODO check on release
202
202
  /**
203
203
  * Cesium Globe Map Class (3D map)
204
204
  * @class
205
- * @export
206
205
  * @extends {VcsMap}
207
206
  * @api stable
208
207
  */
@@ -2,7 +2,6 @@
2
2
  * The state of a map.
3
3
  * State machine: inactive <-> loading -> active -> inactive
4
4
  * @enum {number}
5
- * @export
6
5
  * @api
7
6
  * @property {number} INACTIVE
8
7
  * @property {number} ACTIVE
@@ -76,7 +76,6 @@ export function getMercatorViewpointCenter(viewpoint) {
76
76
  * ObliqueMap Map Class (2D map with oblique imagery)
77
77
  *
78
78
  * @class
79
- * @export
80
79
  * @extends {BaseOLMap}
81
80
  * @api stable
82
81
  */
@@ -18,7 +18,6 @@ import { mapClassRegistry } from '../classRegistry.js';
18
18
  /**
19
19
  * OpenlayersMap Map Class (2D map)
20
20
  * @class
21
- * @export
22
21
  * @extends {BaseOLMap}
23
22
  * @api stable
24
23
  */
package/src/map/vcsMap.js CHANGED
@@ -504,13 +504,17 @@ class VcsMap extends VcsObject {
504
504
  this._collectionListeners.forEach((cb) => { cb(); });
505
505
  this._collectionListeners = [];
506
506
 
507
- [...this.layerCollection].forEach((l) => { l.removedFromMap(this); });
507
+ if (this.layerCollection) {
508
+ [...this.layerCollection].forEach((l) => {
509
+ l.removedFromMap(this);
510
+ });
511
+ }
508
512
  if (this.stateChanged) {
509
513
  this.stateChanged.destroy();
510
514
  this.stateChanged = null;
511
515
  }
512
516
 
513
- if (this.destroyLayerCollection) {
517
+ if (this.destroyLayerCollection && this.layerCollection) {
514
518
  this.layerCollection.destroy();
515
519
  }
516
520
 
@@ -80,7 +80,6 @@ function angleBetweenTwo2DVectors(v1, v2) {
80
80
  * @param {Array<import("ol/coordinate").Coordinate>} segment1
81
81
  * @param {Array<import("ol/coordinate").Coordinate>} segment2
82
82
  * @returns {{x: (number|null), y:(number|null), onLine1: boolean, onLine2: boolean}}
83
- * @export
84
83
  */
85
84
  export function checkLineIntersection(segment1, segment2) {
86
85
  // if the lines intersect, the result contains the x and y of the intersection (treating the lines as infinite) and booleans for whether line segment 1 or line segment 2 contain the point
@@ -306,7 +305,6 @@ export function transformCWIFC(inputOrigin, inputTarget, originIsImage, coordina
306
305
  * @param {import("ol/coordinate").Coordinate} worldCoordinate if not in web mercatpr, specify data-projection in options
307
306
  * @param {ImageTransformationOptions=} options
308
307
  * @returns {Promise<{coords: import("ol/coordinate").Coordinate, height: number, estimate: (boolean|undefined)}>}
309
- * @export
310
308
  */
311
309
  export function transformToImage(image, worldCoordinate, options = {}) {
312
310
  let gpInternalCoordinates;
@@ -404,7 +402,6 @@ function pickTerrain(pickTerrainOptions) {
404
402
  * @param {import("ol/coordinate").Coordinate} imageCoordinate
405
403
  * @param {ImageTransformationOptions=} options
406
404
  * @returns {Promise<PickTerrainReturn>} return coordinates are in mercator if not specified in options
407
- * @export
408
405
  */
409
406
  export async function transformFromImage(image, imageCoordinate, options = {}) {
410
407
  const initialWorldCoords = transform(
@@ -111,7 +111,6 @@ function getTileFeatures(tiles) {
111
111
 
112
112
  /**
113
113
  * @class
114
- * @export
115
114
  * @extends {VcsObject}
116
115
  */
117
116
  class ObliqueCollection extends VcsObject {
@@ -18,7 +18,6 @@ import { requestJson } from '../util/fetch.js';
18
18
  * @property {number} PENDING
19
19
  * @property {number} LOADING
20
20
  * @property {number} READY
21
- * @export
22
21
  * @api
23
22
  */
24
23
  export const DataState = {
@@ -45,7 +44,6 @@ export function getStateFromStatesArray(states) {
45
44
 
46
45
  /**
47
46
  * @class
48
- * @export
49
47
  */
50
48
  class ObliqueDataSet {
51
49
  /**
@@ -20,7 +20,6 @@ import { getHeightFromTerrainProvider } from '../layer/terrainHelpers.js';
20
20
 
21
21
  /**
22
22
  * @class
23
- * @export
24
23
  */
25
24
  class ObliqueImage {
26
25
  /**
@@ -20,7 +20,6 @@ import { cartesian2DDistance } from '../util/math.js';
20
20
 
21
21
  /**
22
22
  * @class
23
- * @export
24
23
  */
25
24
  class ObliqueImageMeta {
26
25
  /**
@@ -35,7 +35,6 @@ function withinBounds(number, max) {
35
35
 
36
36
  /**
37
37
  * @class
38
- * @export
39
38
  */
40
39
  class ObliqueProvider {
41
40
  /**
@@ -40,7 +40,6 @@ function getDefaultImage() {
40
40
 
41
41
  /**
42
42
  * @class
43
- * @export
44
43
  */
45
44
  class ObliqueView {
46
45
  /**
@@ -6,7 +6,6 @@
6
6
  * @property {number} SOUTH
7
7
  * @property {number} WEST
8
8
  * @property {number} NADIR
9
- * @export
10
9
  * @api
11
10
  */
12
11
  export const ObliqueViewDirection = {
@@ -19,7 +18,6 @@ export const ObliqueViewDirection = {
19
18
 
20
19
  /**
21
20
  * @type {Object<string, ObliqueViewDirection>}
22
- * @export
23
21
  */
24
22
  export const obliqueViewDirectionNames = {
25
23
  north: ObliqueViewDirection.NORTH,
@@ -32,7 +30,6 @@ export const obliqueViewDirectionNames = {
32
30
  /**
33
31
  * @param {number} direction
34
32
  * @returns {string|undefined}
35
- * @export
36
33
  */
37
34
  export function getDirectionName(direction) {
38
35
  return Object.keys(obliqueViewDirectionNames)
@@ -8,7 +8,6 @@ import { transform2D } from 'ol/geom/flat/transform.js';
8
8
  * @class
9
9
  * @extends {CanvasImmediateRenderer}
10
10
  * @memberOf ol
11
- * @exports
12
11
  * Tile Renderer Implementation of openlayers CanvasImmediateRenderer
13
12
  * can be used to allow for a correction Factor to take into account Mercator Tile distortion
14
13
  */
@@ -94,7 +94,6 @@ function addCustomProperty(style, key, options) {
94
94
  /**
95
95
  * Style Object {@see https://github.com/AnalyticalGraphicsInc/3d-tiles/tree/master/Styling}
96
96
  * @class
97
- * @export
98
97
  * @extends {StyleItem}
99
98
  * @api stable
100
99
  */
@@ -6,7 +6,6 @@ import Circle from 'ol/style/Circle.js';
6
6
  /**
7
7
  * @param {VectorStyleItemImage} options
8
8
  * @returns {import("ol/style/RegularShape").default|import("ol/style/Circle").default}
9
- * @export
10
9
  */
11
10
 
12
11
  export function getShapeFromOptions(options) {
@@ -43,7 +42,6 @@ class ShapeCategory {
43
42
  }
44
43
 
45
44
  /**
46
- * @export
47
45
  * TODO refactor to getdefaultShapeCategory...
48
46
  */
49
47
  export const shapeCategory = new ShapeCategory();
@@ -27,7 +27,6 @@ function getLogger() {
27
27
  /**
28
28
  * @enum {number}
29
29
  * @const
30
- * @export
31
30
  * @property {number} NWSE
32
31
  * @property {number} SWNE
33
32
  * @property {number} DIAGONALCROSS
@@ -50,7 +49,6 @@ export const PatternType = {
50
49
  * @param {string} h
51
50
  * @param {number=} opacity
52
51
  * @returns {import("ol/color").Color}
53
- * @export
54
52
  */
55
53
  export function hexToOlColor(h, opacity) {
56
54
  let hex = h.substring(1);
@@ -81,7 +79,6 @@ export function cesiumColorToColor(cesiumColor) {
81
79
  * @param {import("ol/color").Color} olColor
82
80
  * @returns {import("@vcmap/cesium").Color}
83
81
  * @api
84
- * @export
85
82
  */
86
83
  export function olColorToCesiumColor(olColor) {
87
84
  return Color.fromBytes(olColor[0], olColor[1], olColor[2], olColor[3] * 255);
@@ -93,7 +90,6 @@ export function olColorToCesiumColor(olColor) {
93
90
  * @param {import("ol/color").Color=} defaultColor
94
91
  * @returns {import("ol/color").Color}
95
92
  * @api
96
- * @export
97
93
  */
98
94
  export function parseColor(color, defaultColor) {
99
95
  if (Array.isArray(color)) {
@@ -135,7 +131,6 @@ export function parseColor(color, defaultColor) {
135
131
  * @param {import("ol/color").Color|import("ol/colorlike").ColorLike} color
136
132
  * @param {import("ol/color").Color} defaultColor
137
133
  * @returns {import("@vcmap/cesium").Color}
138
- * @export
139
134
  */
140
135
  export function getCesiumColor(color, defaultColor) {
141
136
  const olColor = parseColor(color, defaultColor);
@@ -145,7 +140,6 @@ export function getCesiumColor(color, defaultColor) {
145
140
  /**
146
141
  * @param {import("ol/color").Color|Array<number>|import("ol/colorlike").ColorLike} color
147
142
  * @returns {string}
148
- * @export
149
143
  */
150
144
  export function getStringColor(color) {
151
145
  return `rgba(${parseColor(color).join(',')})`;
@@ -155,7 +149,6 @@ export function getStringColor(color) {
155
149
  * @param {VectorStyleItemFill} options
156
150
  * @param {HTMLCanvasElement=} optCanvas
157
151
  * @returns {CanvasPattern}
158
- * @export
159
152
  */
160
153
  export function createPattern(options, optCanvas) {
161
154
  const pixelRatio = DEVICE_PIXEL_RATIO;
@@ -215,7 +208,6 @@ export function createPattern(options, optCanvas) {
215
208
  /**
216
209
  * @param {import("ol/color").Color} color
217
210
  * @returns {string}
218
- * @export
219
211
  */
220
212
  export function olColorToHex(color) {
221
213
  function componentHex(c) {
@@ -230,7 +222,6 @@ export function olColorToHex(color) {
230
222
  /**
231
223
  * @param {string} colorValue
232
224
  * @returns {boolean}
233
- * @export
234
225
  */
235
226
  export function validateHexColor(colorValue) {
236
227
  return /^#[0-9a-f]{6}$/.test(colorValue);
@@ -239,7 +230,6 @@ export function validateHexColor(colorValue) {
239
230
  /**
240
231
  * @param {string|FontObject} font
241
232
  * @returns {FontObject}
242
- * @export
243
233
  */
244
234
  export function parseFont(font) {
245
235
  if (typeof font !== 'string') {
@@ -310,7 +300,6 @@ export function parseFont(font) {
310
300
  /**
311
301
  * @param {FontObject} fontObject
312
302
  * @returns {string}
313
- * @export
314
303
  */
315
304
  export function combineFont(fontObject) {
316
305
  const order = [
@@ -28,7 +28,6 @@ import { styleClassRegistry } from '../classRegistry.js';
28
28
  /**
29
29
  * An abstract style definition which can be applied to a layer
30
30
  * @class
31
- * @export
32
31
  * @api
33
32
  * @abstract
34
33
  * @extends {VcsObject}
@@ -118,14 +118,12 @@ export const OlcsGeometryType = {
118
118
  * Is set by the Editor if the layerStyle is overwritten. The VectorLayer layer assures this style is set, if
119
119
  * the style on the layer is not a DeclarativeStyle
120
120
  * @type {symbol}
121
- * @export
122
121
  */
123
122
  export const vectorStyleSymbol = Symbol('VcsVectorStyleItem');
124
123
 
125
124
  /**
126
125
  * @class
127
126
  * @extends {StyleItem}
128
- * @export
129
127
  * @api
130
128
  */
131
129
  class VectorStyleItem extends StyleItem {
@@ -895,7 +893,6 @@ export default VectorStyleItem;
895
893
 
896
894
  /**
897
895
  * @type {VectorStyleItem}
898
- * @export
899
896
  */
900
897
  export const defaultVectorStyle = new VectorStyleItem(getDefaultVectorStyleItemOptions());
901
898
  styleClassRegistry.registerClass(VectorStyleItem.className, VectorStyleItem);
@@ -903,7 +900,6 @@ styleClassRegistry.registerClass(VectorStyleItem.className, VectorStyleItem);
903
900
  /**
904
901
  * @param {import("@vcmap/cesium").Color} cesiumColor
905
902
  * @returns {VectorStyleItem}
906
- * @export
907
903
  */
908
904
  export function fromCesiumColor(cesiumColor) {
909
905
  const color = /** @type {import("ol/color").Color} */ (cesiumColor.toBytes());
@@ -10,7 +10,6 @@ import LayerCollection from '../layerCollection.js';
10
10
 
11
11
  /**
12
12
  * @namespace clipping
13
- * @export
14
13
  * @api
15
14
  */
16
15
 
@@ -50,7 +49,6 @@ const globeSymbol = Symbol('ClippingObjectGlobe');
50
49
  * To update the Cesium.ClippingPlaneCollection or its definitions, you must trigger an update by setting the clippingPlaneCollection
51
50
  * property to the new definition.
52
51
  * @class
53
- * @export
54
52
  * @api stable
55
53
  */
56
54
  class ClippingObject {
@@ -12,7 +12,6 @@ import CesiumMap from '../../map/cesiumMap.js';
12
12
  * overwritten in the order they where added to the manager. Exclusive [ClippingObjects]{@link ClippingObject} are always applied last, even
13
13
  * if a default [ClippingObject]{@link ClippingObject} is added after.
14
14
  * @class
15
- * @export
16
15
  * @api stable
17
16
  */
18
17
  class ClippingObjectManager {
@@ -139,7 +139,6 @@ function createEndingPlanes(coords) {
139
139
  * @param {import("@vcmap/cesium").Matrix4=} transformMatrix - 4x4 matrix specifying the transform of clipping planes from Earth's fixed frame to another one
140
140
  * @returns {import("@vcmap/cesium").ClippingPlaneCollection|null}
141
141
  * @api stable
142
- * @export
143
142
  */
144
143
  export function createClippingPlaneCollection(feature, options = {}, transformMatrix) {
145
144
  check(feature, Feature);
@@ -203,7 +202,6 @@ export function createClippingPlaneCollection(feature, options = {}, transformMa
203
202
  * @param {import("@vcmap/cesium").Cartesian3=} originPoint - the origin point of the transformation target, so the plane distance can be set correctly
204
203
  * @returns {import("@vcmap/cesium").ClippingPlaneCollection}
205
204
  * @api stable
206
- * @export
207
205
  */
208
206
  export function copyClippingPlanesToCollection(source, result, transformMatrix, originPoint) {
209
207
  check(source, ClippingPlaneCollection);
@@ -346,7 +344,6 @@ export function setClippingPlanes(target, clippingPlaneCollection, local) {
346
344
  * @param {number} [offsetDistance=25] - the offset from the coordinate to use for the size of the geometry
347
345
  * @returns {import("ol").Feature<import("ol/geom/Geometry").default>} - the features geometry is in web mercator
348
346
  * @api
349
- * @export
350
347
  */
351
348
  export function createClippingFeature(coordinate, camera, vertical = false, offsetDistance = 25) {
352
349
  check(coordinate, [Number]);
@@ -389,7 +386,6 @@ export function createClippingFeature(coordinate, camera, vertical = false, offs
389
386
  * @param {boolean=} [infinite=false]
390
387
  * @returns {CreationOptions}
391
388
  * @api
392
- * @export
393
389
  */
394
390
  export function getClippingOptions(feature, infinite = false) {
395
391
  checkMaybe(feature, Feature);
@@ -3,7 +3,6 @@ import VcsEvent from '../vcsEvent.js';
3
3
  /**
4
4
  * A generic array based collection. Implements the Symbol.iterator (e.g. [...collection])
5
5
  * @class
6
- * @export
7
6
  * @template {*} T
8
7
  * @api
9
8
  */
@@ -135,15 +134,28 @@ class Collection {
135
134
  return null;
136
135
  }
137
136
 
137
+ /**
138
+ * internal remove function, to remove an item from the collection, does not raise an event.
139
+ * @param {T} item
140
+ * @returns {number} returns the index of the removed item or -1 if the item has not been found.
141
+ * @protected
142
+ */
143
+ _remove(item) {
144
+ const index = this._array.indexOf(item);
145
+ if (index > -1) {
146
+ this._array.splice(index, 1);
147
+ }
148
+ return index;
149
+ }
150
+
138
151
  /**
139
152
  * Removes an item from the collection
140
153
  * @param {T} item
141
154
  * @api
142
155
  */
143
156
  remove(item) {
144
- const index = this._array.indexOf(item);
157
+ const index = this._remove(item);
145
158
  if (index > -1) {
146
- this._array.splice(index, 1);
147
159
  this.removed.raiseEvent(item);
148
160
  }
149
161
  }
@@ -33,7 +33,6 @@ function checkExtentValidity(extent) {
33
33
  /**
34
34
  * Extent Class
35
35
  * @class
36
- * @export
37
36
  * @api
38
37
  */
39
38
  class Extent {
@@ -4,7 +4,6 @@ import Collection from './collection.js';
4
4
  /**
5
5
  * A generic array based collection. Implements the Symbol.iterator (e.g. [...collection])
6
6
  * @class
7
- * @export
8
7
  * @template {*} T
9
8
  * @extends {Collection<T>}
10
9
  * @api