@vcmap/core 5.0.0-rc.5 → 5.0.0-rc.8

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 (146) hide show
  1. package/README.md +3 -1
  2. package/index.d.ts +1668 -1704
  3. package/index.js +139 -139
  4. package/package.json +5 -7
  5. package/src/{vcs/vcm/category → category}/appBackedCategory.js +1 -1
  6. package/src/{vcs/vcm/category → category}/category.js +8 -8
  7. package/src/{vcs/vcm/category → category}/categoryCollection.js +0 -0
  8. package/src/{vcs/vcm/classRegistry.js → classRegistry.js} +1 -18
  9. package/src/{vcs/vcm/context.js → context.js} +0 -0
  10. package/src/{vcs/vcm/util/featureProvider → featureProvider}/abstractFeatureProvider.js +5 -5
  11. package/src/{vcs/vcm/util/featureProvider → featureProvider}/featureProviderHelpers.js +2 -2
  12. package/src/{vcs/vcm/util/featureProvider → featureProvider}/featureProviderSymbols.js +0 -0
  13. package/src/{vcs/vcm/util/featureProvider → featureProvider}/tileProviderFeatureProvider.js +2 -2
  14. package/src/{vcs/vcm/util/featureProvider → featureProvider}/wmsFeatureProvider.js +9 -8
  15. package/src/{vcs/vcm/globalCollections.js → globalCollections.js} +1 -5
  16. package/src/{vcs/vcm/interaction → interaction}/abstractInteraction.js +19 -17
  17. package/src/{vcs/vcm/interaction → interaction}/coordinateAtPixel.js +5 -8
  18. package/src/{vcs/vcm/interaction → interaction}/eventHandler.js +3 -3
  19. package/src/{vcs/vcm/interaction → interaction}/featureAtPixelInteraction.js +6 -19
  20. package/src/{vcs/vcm/interaction → interaction}/featureProviderInteraction.js +2 -13
  21. package/src/{vcs/vcm/interaction → interaction}/interactionChain.js +11 -31
  22. package/src/{vcs/vcm/interaction → interaction}/interactionType.js +0 -0
  23. package/src/{vcs/vcm/layer/cesium/cesiumTilesetCesium.js → layer/cesium/cesiumTilesetCesiumImpl.js} +3 -3
  24. package/src/{vcs/vcm/layer → layer}/cesium/clusterContext.js +0 -0
  25. package/src/{vcs/vcm/layer/cesium/dataSourceCesium.js → layer/cesium/dataSourceCesiumImpl.js} +5 -2
  26. package/src/{vcs/vcm/layer/cesium/openStreetMapCesium.js → layer/cesium/openStreetMapCesiumImpl.js} +6 -6
  27. package/src/{vcs/vcm/layer/cesium/pointCloudCesium.js → layer/cesium/pointCloudCesiumImpl.js} +6 -6
  28. package/src/{vcs/vcm/layer/cesium/rasterLayerCesium.js → layer/cesium/rasterLayerCesiumImpl.js} +3 -3
  29. package/src/{vcs/vcm/layer/cesium/singleImageCesium.js → layer/cesium/singleImageCesiumImpl.js} +5 -5
  30. package/src/{vcs/vcm/layer/cesium/terrainCesium.js → layer/cesium/terrainCesiumImpl.js} +4 -4
  31. package/src/{vcs/vcm/layer/cesium/tmsCesium.js → layer/cesium/tmsCesiumImpl.js} +6 -6
  32. package/src/{vcs/vcm/layer/cesium/vectorCesium.js → layer/cesium/vectorCesiumImpl.js} +3 -3
  33. package/src/{vcs/vcm/layer → layer}/cesium/vectorContext.js +0 -0
  34. package/src/{vcs/vcm/layer/cesium/vectorRasterTileCesium.js → layer/cesium/vectorRasterTileCesiumImpl.js} +5 -5
  35. package/src/{vcs/vcm/layer → layer}/cesium/vectorTileImageryProvider.js +1 -1
  36. package/src/{vcs/vcm/layer/cesium/wmsCesium.js → layer/cesium/wmsCesiumImpl.js} +6 -6
  37. package/src/{vcs/vcm/layer/cesium/wmtsCesium.js → layer/cesium/wmtsCesiumImpl.js} +6 -6
  38. package/src/{vcs/vcm/layer → layer}/cesium/x3dmHelper.js +0 -0
  39. package/src/{vcs/vcm/layer/cesiumTileset.js → layer/cesiumTilesetLayer.js} +18 -18
  40. package/src/{vcs/vcm/layer/czml.js → layer/czmlLayer.js} +9 -9
  41. package/src/{vcs/vcm/layer/dataSource.js → layer/dataSourceLayer.js} +10 -10
  42. package/src/{vcs/vcm/layer → layer}/featureLayer.js +6 -6
  43. package/src/{vcs/vcm/layer/featureStore.js → layer/featureStoreLayer.js} +43 -43
  44. package/src/{vcs/vcm/layer/featureStoreChanges.js → layer/featureStoreLayerChanges.js} +12 -12
  45. package/src/{vcs/vcm/layer/featureStoreState.js → layer/featureStoreLayerState.js} +1 -1
  46. package/src/{vcs/vcm/layer → layer}/featureVisibility.js +6 -5
  47. package/src/{vcs/vcm/layer → layer}/geojsonHelpers.js +13 -18
  48. package/src/{vcs/vcm/layer/geojson.js → layer/geojsonLayer.js} +11 -11
  49. package/src/{vcs/vcm/layer → layer}/globalHider.js +1 -11
  50. package/src/{vcs/vcm/layer → layer}/layer.js +3 -3
  51. package/src/{vcs/vcm/layer → layer}/layerImplementation.js +2 -2
  52. package/src/{vcs/vcm/layer → layer}/layerState.js +0 -0
  53. package/src/{vcs/vcm/layer → layer}/layerSymbols.js +0 -0
  54. package/src/{vcs/vcm/layer/oblique/layerOblique.js → layer/oblique/layerObliqueImpl.js} +4 -4
  55. package/src/{vcs/vcm/layer → layer}/oblique/obliqueHelpers.js +0 -0
  56. package/src/{vcs/vcm/layer/oblique/vectorOblique.js → layer/oblique/vectorObliqueImpl.js} +6 -6
  57. package/src/{vcs/vcm/layer/openStreetMap.js → layer/openStreetMapLayer.js} +19 -19
  58. package/src/{vcs/vcm/layer/openlayers/layerOpenlayers.js → layer/openlayers/layerOpenlayersImpl.js} +5 -5
  59. package/src/layer/openlayers/openStreetMapOpenlayersImpl.js +27 -0
  60. package/src/{vcs/vcm/layer/openlayers/rasterLayerOpenlayers.js → layer/openlayers/rasterLayerOpenlayersImpl.js} +9 -8
  61. package/src/{vcs/vcm/layer/openlayers/singleImageOpenlayers.js → layer/openlayers/singleImageOpenlayersImpl.js} +6 -6
  62. package/src/{vcs/vcm/layer/openlayers/tileDebugOpenlayers.js → layer/openlayers/tileDebugOpenlayersImpl.js} +5 -5
  63. package/src/{vcs/vcm/layer/openlayers/tmsOpenlayers.js → layer/openlayers/tmsOpenlayersImpl.js} +7 -7
  64. package/src/{vcs/vcm/layer/openlayers/vectorOpenlayers.js → layer/openlayers/vectorOpenlayersImpl.js} +6 -6
  65. package/src/{vcs/vcm/layer/openlayers/vectorTileOpenlayers.js → layer/openlayers/vectorTileOpenlayersImpl.js} +6 -6
  66. package/src/{vcs/vcm/layer/openlayers/wmsOpenlayers.js → layer/openlayers/wmsOpenlayersImpl.js} +7 -7
  67. package/src/{vcs/vcm/layer/openlayers/wmtsOpenlayers.js → layer/openlayers/wmtsOpenlayersImpl.js} +7 -7
  68. package/src/{vcs/vcm/layer/pointCloud.js → layer/pointCloudLayer.js} +18 -18
  69. package/src/{vcs/vcm/layer → layer}/rasterLayer.js +2 -2
  70. package/src/{vcs/vcm/layer/singleImage.js → layer/singleImageLayer.js} +15 -15
  71. package/src/{vcs/vcm/layer → layer}/terrainHelpers.js +0 -0
  72. package/src/{vcs/vcm/layer/terrain.js → layer/terrainLayer.js} +10 -10
  73. package/src/{vcs/vcm/layer → layer}/tileLoadedHelper.js +5 -5
  74. package/src/{vcs/vcm/layer → layer}/tileProvider/mvtTileProvider.js +1 -1
  75. package/src/{vcs/vcm/layer → layer}/tileProvider/staticGeojsonTileProvider.js +4 -4
  76. package/src/{vcs/vcm/layer → layer}/tileProvider/tileProvider.js +4 -4
  77. package/src/{vcs/vcm/layer → layer}/tileProvider/tileProviderFactory.js +2 -2
  78. package/src/{vcs/vcm/layer → layer}/tileProvider/urlTemplateTileProvider.js +2 -2
  79. package/src/{vcs/vcm/layer/tms.js → layer/tmsLayer.js} +16 -16
  80. package/src/{vcs/vcm/layer → layer}/vectorHelpers.js +1 -1
  81. package/src/{vcs/vcm/layer/vector.js → layer/vectorLayer.js} +27 -27
  82. package/src/{vcs/vcm/layer → layer}/vectorProperties.js +3 -3
  83. package/src/{vcs/vcm/layer → layer}/vectorSymbols.js +0 -0
  84. package/src/{vcs/vcm/layer/vectorTile.js → layer/vectorTileLayer.js} +19 -19
  85. package/src/{vcs/vcm/layer/wfs.js → layer/wfsLayer.js} +10 -10
  86. package/src/{vcs/vcm/layer → layer}/wmsHelpers.js +1 -1
  87. package/src/{vcs/vcm/layer/wms.js → layer/wmsLayer.js} +18 -18
  88. package/src/{vcs/vcm/layer/wmts.js → layer/wmtsLayer.js} +17 -17
  89. package/src/{vcs/vcm/maps → map}/baseOLMap.js +3 -3
  90. package/src/{vcs/vcm/maps → map}/cameraLimiter.js +1 -1
  91. package/src/{vcs/vcm/maps/cesium.js → map/cesiumMap.js} +13 -28
  92. package/src/{vcs/vcm/maps → map}/mapState.js +0 -0
  93. package/src/{vcs/vcm/maps/oblique.js → map/obliqueMap.js} +31 -45
  94. package/src/{vcs/vcm/maps/openlayers.js → map/openlayersMap.js} +14 -11
  95. package/src/{vcs/vcm/maps/map.js → map/vcsMap.js} +5 -5
  96. package/src/oblique/defaultObliqueCollection.js +62 -0
  97. package/src/{vcs/vcm/oblique → oblique}/helpers.js +1 -1
  98. package/src/{vcs/vcm/oblique/ObliqueCollection.js → oblique/obliqueCollection.js} +39 -10
  99. package/src/{vcs/vcm/oblique/ObliqueDataSet.js → oblique/obliqueDataSet.js} +1 -1
  100. package/src/{vcs/vcm/oblique/ObliqueImage.js → oblique/obliqueImage.js} +0 -0
  101. package/src/{vcs/vcm/oblique/ObliqueImageMeta.js → oblique/obliqueImageMeta.js} +2 -2
  102. package/src/{vcs/vcm/oblique/ObliqueProvider.js → oblique/obliqueProvider.js} +9 -6
  103. package/src/{vcs/vcm/oblique/ObliqueView.js → oblique/obliqueView.js} +31 -1
  104. package/src/{vcs/vcm/oblique/ObliqueViewDirection.js → oblique/obliqueViewDirection.js} +0 -0
  105. package/src/{vcs/vcm/oblique → oblique}/parseImageJson.js +3 -3
  106. package/src/ol/geom/circle.js +1 -1
  107. package/src/{vcs/vcm/util/style → style}/declarativeStyleItem.js +3 -3
  108. package/src/{vcs/vcm/util/style → style}/shapesCategory.js +0 -0
  109. package/src/{vcs/vcm/util/style → style}/styleFactory.js +2 -2
  110. package/src/{vcs/vcm/util/style → style}/styleHelpers.js +1 -1
  111. package/src/{vcs/vcm/util/style → style}/styleItem.js +4 -4
  112. package/src/{vcs/vcm/util/style → style}/vectorStyleItem.js +6 -6
  113. package/src/{vcs/vcm/util/style → style}/writeStyle.js +0 -0
  114. package/src/{vcs/vcm/util → util}/clipping/clippingObject.js +10 -10
  115. package/src/{vcs/vcm/util → util}/clipping/clippingObjectManager.js +2 -2
  116. package/src/{vcs/vcm/util → util}/clipping/clippingPlaneHelper.js +0 -0
  117. package/src/{vcs/vcm/util → util}/collection.js +1 -1
  118. package/src/{vcs/vcm/util → util}/dateTime.js +0 -0
  119. package/src/{vcs/vcm/util → util}/exclusiveManager.js +0 -0
  120. package/src/{vcs/vcm/util → util}/extent.js +1 -1
  121. package/src/{vcs/vcm/util → util}/featureconverter/circleToCesium.js +0 -0
  122. package/src/{vcs/vcm/util → util}/featureconverter/convert.js +0 -0
  123. package/src/{vcs/vcm/util → util}/featureconverter/extent3D.js +0 -0
  124. package/src/{vcs/vcm/util → util}/featureconverter/featureconverterHelper.js +1 -1
  125. package/src/{vcs/vcm/util → util}/featureconverter/lineStringToCesium.js +0 -0
  126. package/src/{vcs/vcm/util → util}/featureconverter/pointToCesium.js +1 -1
  127. package/src/{vcs/vcm/util → util}/featureconverter/polygonToCesium.js +1 -1
  128. package/src/{vcs/vcm/util → util}/fetch.js +0 -0
  129. package/src/{vcs/vcm/util → util}/geometryHelpers.js +0 -0
  130. package/src/{vcs/vcm/util → util}/indexedCollection.js +1 -1
  131. package/src/{vcs/vcm/util → util}/isMobile.js +0 -0
  132. package/src/{vcs/vcm/util → util}/layerCollection.js +1 -1
  133. package/src/{vcs/vcm/util → util}/locale.js +1 -1
  134. package/src/{vcs/vcm/util → util}/mapCollection.js +63 -21
  135. package/src/{vcs/vcm/util → util}/math.js +0 -0
  136. package/src/{vcs/vcm/util → util}/overrideCollection.js +1 -1
  137. package/src/{vcs/vcm/util → util}/projection.js +5 -21
  138. package/src/{vcs/vcm/util → util}/splitScreen.js +3 -3
  139. package/src/{vcs/vcm/util → util}/urlHelpers.js +0 -0
  140. package/src/{vcs/vcm/util → util}/viewpoint.js +2 -2
  141. package/src/{vcs/vcm/vcsApp.js → vcsApp.js} +18 -5
  142. package/src/{vcs/vcm/vcsAppContextHelpers.js → vcsAppContextHelpers.js} +2 -2
  143. package/src/{vcs/vcm/event/vcsEvent.js → vcsEvent.js} +2 -2
  144. package/src/{vcs/vcm/object.js → vcsObject.js} +1 -9
  145. package/src/vcs/vcm/layer/buildings.js +0 -17
  146. package/src/vcs/vcm/layer/openlayers/openStreetMapOpenlayers.js +0 -27
@@ -6,9 +6,9 @@ import { check } from '@vcsuite/check';
6
6
  import { parseBoolean } from '@vcsuite/parsers';
7
7
  import Projection, { getDefaultProjection, mercatorProjection } from '../util/projection.js';
8
8
  import Layer, { vcsMetaVersion } from './layer.js';
9
- import VectorStyleItem, { defaultVectorStyle, vectorStyleSymbol } from '../util/style/vectorStyleItem.js';
10
- import DeclarativeStyleItem from '../util/style/declarativeStyleItem.js';
11
- import writeStyle from '../util/style/writeStyle.js';
9
+ import VectorStyleItem, { defaultVectorStyle, vectorStyleSymbol } from '../style/vectorStyleItem.js';
10
+ import DeclarativeStyleItem from '../style/declarativeStyleItem.js';
11
+ import writeStyle from '../style/writeStyle.js';
12
12
  import {
13
13
  alreadyTransformedToImage,
14
14
  alreadyTransformedToMercator,
@@ -19,14 +19,14 @@ import {
19
19
  import Extent from '../util/extent.js';
20
20
  import VectorProperties from './vectorProperties.js';
21
21
  import FeatureLayer from './featureLayer.js';
22
- import Openlayers from '../maps/openlayers.js';
23
- import VectorOpenlayers from './openlayers/vectorOpenlayers.js';
24
- import VectorCesium from './cesium/vectorCesium.js';
25
- import VectorOblique from './oblique/vectorOblique.js';
26
- import Oblique from '../maps/oblique.js';
27
- import CesiumMap from '../maps/cesium.js';
22
+ import OpenlayersMap from '../map/openlayersMap.js';
23
+ import VectorOpenlayersImpl from './openlayers/vectorOpenlayersImpl.js';
24
+ import VectorCesiumImpl from './cesium/vectorCesiumImpl.js';
25
+ import VectorObliqueImpl from './oblique/vectorObliqueImpl.js';
26
+ import ObliqueMap from '../map/obliqueMap.js';
27
+ import CesiumMap from '../map/cesiumMap.js';
28
28
  import { originalStyle, updateOriginalStyle } from './featureVisibility.js';
29
- import StyleItem, { referenceableStyleSymbol, StyleType } from '../util/style/styleItem.js';
29
+ import StyleItem, { referenceableStyleSymbol, StyleType } from '../style/styleItem.js';
30
30
  import { getGenericFeatureFromClickedObject } from './vectorHelpers.js';
31
31
  import { VcsClassRegistry } from '../classRegistry.js';
32
32
 
@@ -82,18 +82,18 @@ import { VcsClassRegistry } from '../classRegistry.js';
82
82
  */
83
83
 
84
84
  /**
85
- * Vector Layer for Openlayers, Cesium and Oblique
85
+ * VectorLayer Layer for OpenlayersMap, Cesium and ObliqueMap
86
86
  * @class
87
87
  * @export
88
88
  * @extends {FeatureLayer}
89
89
  * @api stable
90
90
  */
91
- class Vector extends FeatureLayer {
91
+ class VectorLayer extends FeatureLayer {
92
92
  /**
93
93
  * @readonly
94
94
  * @returns {string}
95
95
  */
96
- static get className() { return 'vcs.vcm.layer.Vector'; }
96
+ static get className() { return 'VectorLayer'; }
97
97
 
98
98
  /**
99
99
  * @returns {symbol}
@@ -150,11 +150,11 @@ class Vector extends FeatureLayer {
150
150
 
151
151
  this._supportedMaps = [
152
152
  CesiumMap.className,
153
- Oblique.className,
154
- Openlayers.className,
153
+ ObliqueMap.className,
154
+ OpenlayersMap.className,
155
155
  ];
156
156
 
157
- const defaultOptions = Vector.getDefaultOptions();
157
+ const defaultOptions = VectorLayer.getDefaultOptions();
158
158
  /** @type {import("ol/source").Vector<import("ol/geom/Geometry").default>} */
159
159
  this.source = new VectorSource({});
160
160
 
@@ -321,23 +321,23 @@ class Vector extends FeatureLayer {
321
321
  /**
322
322
  * @inheritDoc
323
323
  * @param {import("@vcmap/core").VcsMap} map
324
- * @returns {Array<VectorOblique|VectorCesium|VectorOpenlayers>}
324
+ * @returns {Array<VectorObliqueImpl|VectorCesiumImpl|VectorOpenlayersImpl>}
325
325
  */
326
326
  createImplementationsForMap(map) {
327
327
  if (!this.visibility) {
328
328
  return [];
329
329
  }
330
330
 
331
- if (map instanceof Openlayers) {
332
- return [new VectorOpenlayers(map, this.getImplementationOptions())];
331
+ if (map instanceof OpenlayersMap) {
332
+ return [new VectorOpenlayersImpl(map, this.getImplementationOptions())];
333
333
  }
334
334
 
335
335
  if (map instanceof CesiumMap) {
336
- return [new VectorCesium(map, this.getImplementationOptions())];
336
+ return [new VectorCesiumImpl(map, this.getImplementationOptions())];
337
337
  }
338
338
 
339
- if (map instanceof Oblique) {
340
- return [new VectorOblique(map, this.getImplementationOptions())];
339
+ if (map instanceof ObliqueMap) {
340
+ return [new VectorObliqueImpl(map, this.getImplementationOptions())];
341
341
  }
342
342
 
343
343
  return [];
@@ -453,9 +453,9 @@ class Vector extends FeatureLayer {
453
453
  if (this.projection.epsg !== mercatorProjection.epsg) {
454
454
  const geometry = feature.getGeometry();
455
455
  if (geometry) {
456
- if (!geometry[Vector.alreadyTransformedToMercator]) {
456
+ if (!geometry[VectorLayer.alreadyTransformedToMercator]) {
457
457
  geometry.transform(this.projection.proj, mercatorProjection.proj);
458
- geometry[Vector.alreadyTransformedToMercator] = true;
458
+ geometry[VectorLayer.alreadyTransformedToMercator] = true;
459
459
  }
460
460
  }
461
461
  }
@@ -575,7 +575,7 @@ class Vector extends FeatureLayer {
575
575
  */
576
576
  toJSON() {
577
577
  const config = /** @type {VectorOptions} */ (super.toJSON());
578
- const defaultOptions = Vector.getDefaultOptions();
578
+ const defaultOptions = VectorLayer.getDefaultOptions();
579
579
 
580
580
  if (this.projection.epsg !== getDefaultProjection().epsg) {
581
581
  config.projection = this.projection.toJSON();
@@ -628,5 +628,5 @@ class Vector extends FeatureLayer {
628
628
  }
629
629
  }
630
630
 
631
- VcsClassRegistry.registerClass(Vector.className, Vector);
632
- export default Vector;
631
+ VcsClassRegistry.registerClass(VectorLayer.className, VectorLayer);
632
+ export default VectorLayer;
@@ -3,13 +3,13 @@ import { HeightReference, ClassificationType, NearFarScalar, Cartesian3 } from '
3
3
  import { check, checkMaybe } from '@vcsuite/check';
4
4
  import { parseBoolean, parseEnumKey, parseNumber, parseInteger } from '@vcsuite/parsers';
5
5
  import { getLogger as getLoggerByName } from '@vcsuite/logger';
6
- import VcsEvent from '../event/vcsEvent.js';
6
+ import VcsEvent from '../vcsEvent.js';
7
7
 
8
8
  /**
9
9
  * @returns {import("@vcsuite/logger").Logger}
10
10
  */
11
11
  function getLogger() {
12
- return getLoggerByName('vcs.vcm.layer.VectorProperties');
12
+ return getLoggerByName('VectorProperties');
13
13
  }
14
14
 
15
15
  /**
@@ -162,7 +162,7 @@ export function getCartesian3Options(cartesian3) {
162
162
  }
163
163
 
164
164
  /**
165
- * Properties Collection for Vector Features
165
+ * Properties Collection for VectorLayer Features
166
166
  * @class
167
167
  * @export
168
168
  * @api stable
File without changes
@@ -1,17 +1,17 @@
1
1
  import Style from 'ol/style/Style.js';
2
2
  import { parseInteger } from '@vcsuite/parsers';
3
- import CesiumMap from '../maps/cesium.js';
4
- import VectorRasterTileCesium from './cesium/vectorRasterTileCesium.js';
5
- import Openlayers from '../maps/openlayers.js';
6
- import VectorTileOpenlayers from './openlayers/vectorTileOpenlayers.js';
3
+ import CesiumMap from '../map/cesiumMap.js';
4
+ import VectorRasterTileCesiumImpl from './cesium/vectorRasterTileCesiumImpl.js';
5
+ import OpenlayersMap from '../map/openlayersMap.js';
6
+ import VectorTileOpenlayersImpl from './openlayers/vectorTileOpenlayersImpl.js';
7
7
  import FeatureLayer from './featureLayer.js';
8
- import VectorStyleItem, { defaultVectorStyle } from '../util/style/vectorStyleItem.js';
8
+ import VectorStyleItem, { defaultVectorStyle } from '../style/vectorStyleItem.js';
9
9
  import VectorProperties from './vectorProperties.js';
10
- import DeclarativeStyleItem from '../util/style/declarativeStyleItem.js';
10
+ import DeclarativeStyleItem from '../style/declarativeStyleItem.js';
11
11
  import { FeatureVisibilityAction, globalHidden, hidden, highlighted } from './featureVisibility.js';
12
12
  import { getStylesArray } from '../util/featureconverter/convert.js';
13
13
  import { vcsLayerName } from './layerSymbols.js';
14
- import TileProviderFeatureProvider from '../util/featureProvider/tileProviderFeatureProvider.js';
14
+ import TileProviderFeatureProvider from '../featureProvider/tileProviderFeatureProvider.js';
15
15
  import tileProviderFactory from './tileProvider/tileProviderFactory.js';
16
16
  import { getGenericFeatureFromClickedObject } from './vectorHelpers.js';
17
17
  import { originalFeatureSymbol } from './vectorSymbols.js';
@@ -67,18 +67,18 @@ function synchronizeFeatureVisibility(featureVisibility, globalHider, feature) {
67
67
  */
68
68
 
69
69
  /**
70
- * VectorTile Layer for tiled vector Data. Can be connected to data with a TileProvider
70
+ * VectorTileLayer Layer for tiled vector Data. Can be connected to data with a TileProvider
71
71
  * @class
72
72
  * @export
73
73
  * @extends {FeatureLayer}
74
74
  * @api stable
75
75
  */
76
- class VectorTile extends FeatureLayer {
76
+ class VectorTileLayer extends FeatureLayer {
77
77
  /**
78
78
  * @readonly
79
79
  * @returns {string}
80
80
  */
81
- static get className() { return 'vcs.vcm.layer.VectorTile'; }
81
+ static get className() { return 'VectorTileLayer'; }
82
82
 
83
83
  /**
84
84
  * @returns {VectorTileOptions}
@@ -103,10 +103,10 @@ class VectorTile extends FeatureLayer {
103
103
 
104
104
  this._supportedMaps = [
105
105
  CesiumMap.className,
106
- Openlayers.className,
106
+ OpenlayersMap.className,
107
107
  ];
108
108
 
109
- const defaultOptions = VectorTile.getDefaultOptions();
109
+ const defaultOptions = VectorTileLayer.getDefaultOptions();
110
110
 
111
111
  /** @type {VectorStyleItem} */
112
112
  this.highlightStyle = /** @type {undefined} */ (defaultOptions.highlightStyle);
@@ -375,16 +375,16 @@ class VectorTile extends FeatureLayer {
375
375
  /**
376
376
  * @inheritDoc
377
377
  * @param {import("@vcmap/core").VcsMap} map
378
- * @returns {Array<VectorRasterTileCesium|VectorTileOpenlayers>}
378
+ * @returns {Array<VectorRasterTileCesiumImpl|VectorTileOpenlayersImpl>}
379
379
  */
380
380
  createImplementationsForMap(map) {
381
381
  if (map instanceof CesiumMap) {
382
- return [new VectorRasterTileCesium(map, this.getImplementationOptions())];
382
+ return [new VectorRasterTileCesiumImpl(map, this.getImplementationOptions())];
383
383
  }
384
384
 
385
- if (map instanceof Openlayers) {
385
+ if (map instanceof OpenlayersMap) {
386
386
  return [
387
- new VectorTileOpenlayers(map, this.getImplementationOptions()),
387
+ new VectorTileOpenlayersImpl(map, this.getImplementationOptions()),
388
388
  ];
389
389
  }
390
390
 
@@ -450,7 +450,7 @@ class VectorTile extends FeatureLayer {
450
450
  */
451
451
  toJSON() {
452
452
  const config = /** @type {VectorTileOptions} */ (super.toJSON());
453
- const defaultOptions = VectorTile.getDefaultOptions();
453
+ const defaultOptions = VectorTileLayer.getDefaultOptions();
454
454
 
455
455
  if (this._maxLevel !== defaultOptions.maxLevel) {
456
456
  config.maxLevel = this._maxLevel;
@@ -476,5 +476,5 @@ class VectorTile extends FeatureLayer {
476
476
  }
477
477
  }
478
478
 
479
- VcsClassRegistry.registerClass(VectorTile.className, VectorTile);
480
- export default VectorTile;
479
+ VcsClassRegistry.registerClass(VectorTileLayer.className, VectorTileLayer);
480
+ export default VectorTileLayer;
@@ -1,5 +1,5 @@
1
1
  import WFSFormat from 'ol/format/WFS.js';
2
- import Vector from './vector.js';
2
+ import VectorLayer from './vectorLayer.js';
3
3
  import Projection from '../util/projection.js';
4
4
  import { VcsClassRegistry } from '../classRegistry.js';
5
5
  import { requestJson } from '../util/fetch.js';
@@ -14,21 +14,21 @@ import { requestJson } from '../util/fetch.js';
14
14
  */
15
15
 
16
16
  /**
17
- * WFS Vector Layer
17
+ * WfsLayer VectorLayer Layer
18
18
  * @class
19
19
  * @export
20
- * @extends {Vector}
20
+ * @extends {VectorLayer}
21
21
  * @api
22
22
  */
23
- class WFS extends Vector {
24
- static get className() { return 'vcs.vcm.layer.WFS'; }
23
+ class WFSLayer extends VectorLayer {
24
+ static get className() { return 'WFSLayer'; }
25
25
 
26
26
  /**
27
27
  * @returns {WFSOptions}
28
28
  */
29
29
  static getDefaultOptions() {
30
30
  return {
31
- ...Vector.getDefaultOptions(),
31
+ ...VectorLayer.getDefaultOptions(),
32
32
  featureType: [],
33
33
  featureNS: '',
34
34
  featurePrefix: '',
@@ -131,8 +131,8 @@ class WFS extends Vector {
131
131
 
132
132
  return this._dataFetchedPromise;
133
133
  }
134
- this.getLogger().warning('Could not load WFS layer, no url is set');
135
- return Promise.reject(new Error('missing url in WFS layer'));
134
+ this.getLogger().warning('Could not load WFSLayer layer, no url is set');
135
+ return Promise.reject(new Error('missing url in WFSLayer layer'));
136
136
  }
137
137
 
138
138
  /**
@@ -161,5 +161,5 @@ class WFS extends Vector {
161
161
  }
162
162
  }
163
163
 
164
- VcsClassRegistry.registerClass(WFS.className, WFS);
165
- export default WFS;
164
+ VcsClassRegistry.registerClass(WFSLayer.className, WFSLayer);
165
+ export default WFSLayer;
@@ -33,7 +33,7 @@ export function getWMSSource(options) {
33
33
  const maxZoom = options.maxLevel + 1;
34
34
  const resolutions = [];
35
35
  for (let z = 0; z < maxZoom; ++z) {
36
- // generate resolutions and matrixIds arrays for options WMTS
36
+ // generate resolutions and matrixIds arrays for options WmtsLayer
37
37
  resolutions.push(size / (2 ** z));
38
38
  }
39
39
  const tilingOptions = {
@@ -1,11 +1,11 @@
1
1
  import { check } from '@vcsuite/check';
2
2
  import { parseBoolean } from '@vcsuite/parsers';
3
3
  import RasterLayer from './rasterLayer.js';
4
- import WMSFeatureProvider from '../util/featureProvider/wmsFeatureProvider.js';
5
- import CesiumMap from '../maps/cesium.js';
6
- import WMSCesium from './cesium/wmsCesium.js';
7
- import Openlayers from '../maps/openlayers.js';
8
- import WMSOpenlayers from './openlayers/wmsOpenlayers.js';
4
+ import WMSFeatureProvider from '../featureProvider/wmsFeatureProvider.js';
5
+ import CesiumMap from '../map/cesiumMap.js';
6
+ import WmsCesiumImpl from './cesium/wmsCesiumImpl.js';
7
+ import OpenlayersMap from '../map/openlayersMap.js';
8
+ import WmsOpenlayersImpl from './openlayers/wmsOpenlayersImpl.js';
9
9
  import Extent from '../util/extent.js';
10
10
  import { VcsClassRegistry } from '../classRegistry.js';
11
11
 
@@ -30,14 +30,14 @@ import { VcsClassRegistry } from '../classRegistry.js';
30
30
  */
31
31
 
32
32
  /**
33
- * WMS layer for Cesium and Openlayers
33
+ * WmsLayer layer for Cesium and OpenlayersMap
34
34
  * @class
35
35
  * @export
36
36
  * @extends {RasterLayer}
37
37
  * @api stable
38
38
  */
39
- class WMS extends RasterLayer {
40
- static get className() { return 'vcs.vcm.layer.WMS'; }
39
+ class WMSLayer extends RasterLayer {
40
+ static get className() { return 'WMSLayer'; }
41
41
 
42
42
  /**
43
43
  * @returns {WMSOptions}
@@ -59,7 +59,7 @@ class WMS extends RasterLayer {
59
59
  */
60
60
  constructor(options) {
61
61
  super(options);
62
- const defaultOptions = WMS.getDefaultOptions();
62
+ const defaultOptions = WMSLayer.getDefaultOptions();
63
63
 
64
64
  /** @type {string} */
65
65
  this.version = options.version || defaultOptions.version;
@@ -97,7 +97,7 @@ class WMS extends RasterLayer {
97
97
  this._featureInfoOptions = options.featureInfo || defaultOptions.featureInfo;
98
98
  this._supportedMaps = [
99
99
  CesiumMap.className,
100
- Openlayers.className,
100
+ OpenlayersMap.className,
101
101
  ];
102
102
  }
103
103
 
@@ -156,19 +156,19 @@ class WMS extends RasterLayer {
156
156
 
157
157
  /**
158
158
  * @param {import("@vcmap/core").VcsMap} map
159
- * @returns {Array<WMSCesium|WMSOpenlayers>}
159
+ * @returns {Array<WmsCesiumImpl|WmsOpenlayersImpl>}
160
160
  */
161
161
  createImplementationsForMap(map) {
162
162
  if (map instanceof CesiumMap) {
163
- return [new WMSCesium(map, this.getImplementationOptions())];
164
- } else if (map instanceof Openlayers) {
165
- return [new WMSOpenlayers(map, this.getImplementationOptions())];
163
+ return [new WmsCesiumImpl(map, this.getImplementationOptions())];
164
+ } else if (map instanceof OpenlayersMap) {
165
+ return [new WmsOpenlayersImpl(map, this.getImplementationOptions())];
166
166
  }
167
167
  return [];
168
168
  }
169
169
 
170
170
  /**
171
- * Sets the layers to request from the WMS
171
+ * Sets the layers to request from the WmsLayer
172
172
  * @param {string|Array<string>} layers - a layer name or an array of layer names
173
173
  * @returns {Promise<void>}
174
174
  * @api stable
@@ -194,7 +194,7 @@ class WMS extends RasterLayer {
194
194
  */
195
195
  toJSON() {
196
196
  const config = /** @type {WMSOptions} */ (super.toJSON());
197
- const defaultOptions = WMS.getDefaultOptions();
197
+ const defaultOptions = WMSLayer.getDefaultOptions();
198
198
 
199
199
  if (this.parameters.LAYERS) {
200
200
  config.layers = this.parameters.LAYERS;
@@ -266,5 +266,5 @@ class WMS extends RasterLayer {
266
266
  }
267
267
  }
268
268
 
269
- VcsClassRegistry.registerClass(WMS.className, WMS);
270
- export default WMS;
269
+ VcsClassRegistry.registerClass(WMSLayer.className, WMSLayer);
270
+ export default WMSLayer;
@@ -1,10 +1,10 @@
1
1
  import { parseInteger } from '@vcsuite/parsers';
2
2
  import { getLogger } from '@vcsuite/logger';
3
3
  import RasterLayer from './rasterLayer.js';
4
- import Openlayers from '../maps/openlayers.js';
5
- import CesiumMap from '../maps/cesium.js';
6
- import WMTSOpenlayers from './openlayers/wmtsOpenlayers.js';
7
- import WMTSCesium from './cesium/wmtsCesium.js';
4
+ import OpenlayersMap from '../map/openlayersMap.js';
5
+ import CesiumMap from '../map/cesiumMap.js';
6
+ import WmtsOpenlayersImpl from './openlayers/wmtsOpenlayersImpl.js';
7
+ import WmtsCesiumImpl from './cesium/wmtsCesiumImpl.js';
8
8
  import { VcsClassRegistry } from '../classRegistry.js';
9
9
 
10
10
  /**
@@ -47,7 +47,7 @@ function getMatrixIds(matrixIds, maxLevel, prefix) {
47
47
  if (matrixIds.length === (maxLevel + 1)) {
48
48
  return matrixIds;
49
49
  } else {
50
- getLogger('vcs.vcm.layer.cesium.WMTSCesium')
50
+ getLogger('WmtsCesiumImpl')
51
51
  .log('matrixIds must have the same length as maxLevel');
52
52
  }
53
53
  }
@@ -58,14 +58,14 @@ function getMatrixIds(matrixIds, maxLevel, prefix) {
58
58
 
59
59
 
60
60
  /**
61
- * WMTS layer
61
+ * WmtsLayer layer
62
62
  * @class
63
63
  * @export
64
64
  * @extends {RasterLayer}
65
65
  * @api stable
66
66
  */
67
- class WMTS extends RasterLayer {
68
- static get className() { return 'vcs.vcm.layer.WMTS'; }
67
+ class WMTSLayer extends RasterLayer {
68
+ static get className() { return 'WMTSLayer'; }
69
69
 
70
70
  /**
71
71
  * @returns {WMTSOptions}
@@ -91,12 +91,12 @@ class WMTS extends RasterLayer {
91
91
  * @param {WMTSOptions} options
92
92
  */
93
93
  constructor(options) {
94
- const defaultOptions = WMTS.getDefaultOptions();
94
+ const defaultOptions = WMTSLayer.getDefaultOptions();
95
95
  options.tilingSchema = options.tilingSchema || defaultOptions.tilingSchema;
96
96
  super(options);
97
97
 
98
98
  this._supportedMaps = [
99
- Openlayers.className,
99
+ OpenlayersMap.className,
100
100
  CesiumMap.className,
101
101
  ];
102
102
 
@@ -159,15 +159,15 @@ class WMTS extends RasterLayer {
159
159
  /**
160
160
  * @inheritDoc
161
161
  * @param {import("@vcmap/core").VcsMap} map
162
- * @returns {Array<WMTSOpenlayers|WMTSCesium>}
162
+ * @returns {Array<WmtsOpenlayersImpl|WmtsCesiumImpl>}
163
163
  */
164
164
  createImplementationsForMap(map) {
165
- if (map instanceof Openlayers) {
166
- return [new WMTSOpenlayers(map, this.getImplementationOptions())];
165
+ if (map instanceof OpenlayersMap) {
166
+ return [new WmtsOpenlayersImpl(map, this.getImplementationOptions())];
167
167
  }
168
168
 
169
169
  if (map instanceof CesiumMap) {
170
- return [new WMTSCesium(map, this.getImplementationOptions())];
170
+ return [new WmtsCesiumImpl(map, this.getImplementationOptions())];
171
171
  }
172
172
  return [];
173
173
  }
@@ -178,7 +178,7 @@ class WMTS extends RasterLayer {
178
178
  */
179
179
  toJSON() {
180
180
  const config = /** @type {WMTSOptions} */ (super.toJSON());
181
- const defaultOptions = WMTS.getDefaultOptions();
181
+ const defaultOptions = WMTSLayer.getDefaultOptions();
182
182
 
183
183
  if (this.tilingSchema !== defaultOptions.tilingSchema) {
184
184
  config.tilingSchema = this.tilingSchema;
@@ -230,6 +230,6 @@ class WMTS extends RasterLayer {
230
230
  }
231
231
  }
232
232
 
233
- VcsClassRegistry.registerClass(WMTS.className, WMTS);
234
- export default WMTS;
233
+ VcsClassRegistry.registerClass(WMTSLayer.className, WMTSLayer);
234
+ export default WMTSLayer;
235
235
 
@@ -2,7 +2,7 @@ import { Cartesian2 } from '@vcmap/cesium';
2
2
  import { unByKey } from 'ol/Observable.js';
3
3
  import OLMap from 'ol/Map.js';
4
4
  import { defaults as defaultInteractions } from 'ol/interaction.js';
5
- import VcsMap from './map.js';
5
+ import VcsMap from './vcsMap.js';
6
6
  import { vcsLayerName } from '../layer/layerSymbols.js';
7
7
  import { ModificationKeyType, PointerEventType, PointerKeyType } from '../interaction/interactionType.js';
8
8
  import { VcsClassRegistry } from '../classRegistry.js';
@@ -32,7 +32,7 @@ export function ensureLayerInCollection(layers, layer, layerCollection) {
32
32
  }
33
33
 
34
34
  /**
35
- * Openlayers Map base map.
35
+ * OpenlayersMap Map base map.
36
36
  * @class
37
37
  * @abstract
38
38
  * @api
@@ -40,7 +40,7 @@ export function ensureLayerInCollection(layers, layer, layerCollection) {
40
40
  * @extends {VcsMap}
41
41
  */
42
42
  class BaseOLMap extends VcsMap {
43
- static get className() { return 'vcs.vcm.maps.BaseOLMap'; }
43
+ static get className() { return 'BaseOLMap'; }
44
44
 
45
45
  /**
46
46
  * @param {VcsMapOptions} options
@@ -35,7 +35,7 @@ export const CameraLimiterMode = {
35
35
  * @api
36
36
  */
37
37
  class CameraLimiter {
38
- static get className() { return 'vcs.vcm.maps.CameraLimiter'; }
38
+ static get className() { return 'CameraLimiter'; }
39
39
 
40
40
  /**
41
41
  * @returns {CameraLimiterOptions}
@@ -31,7 +31,7 @@ import {
31
31
 
32
32
  import { check, checkMaybe } from '@vcsuite/check';
33
33
  import { parseBoolean, parseInteger } from '@vcsuite/parsers';
34
- import VcsMap from './map.js';
34
+ import VcsMap from './vcsMap.js';
35
35
  import ViewPoint from '../util/viewpoint.js';
36
36
  import Projection, { mercatorProjection } from '../util/projection.js';
37
37
  import { getHeightFromTerrainProvider } from '../layer/terrainHelpers.js';
@@ -204,7 +204,7 @@ function setDebugOnVisualizations(visualizations, debug) {
204
204
  * @api stable
205
205
  */
206
206
  class CesiumMap extends VcsMap {
207
- static get className() { return 'vcs.vcm.maps.Cesium'; }
207
+ static get className() { return 'CesiumMap'; }
208
208
 
209
209
  /**
210
210
  * @returns {CesiumMapOptions}
@@ -914,7 +914,7 @@ class CesiumMap extends VcsMap {
914
914
  */
915
915
  removePrimitiveCollection(primitiveCollection) { // XXX add destroy as boolean?
916
916
  this.removeVisualization(primitiveCollection);
917
- this.getScene().primitives.remove(primitiveCollection);
917
+ this.getScene()?.primitives.remove(primitiveCollection);
918
918
  }
919
919
 
920
920
  /**
@@ -934,7 +934,7 @@ class CesiumMap extends VcsMap {
934
934
  */
935
935
  removeImageryLayer(imageryLayer) {
936
936
  this.removeVisualization(imageryLayer);
937
- this.getScene().imageryLayers.remove(imageryLayer);
937
+ this.getScene()?.imageryLayers.remove(imageryLayer);
938
938
  }
939
939
 
940
940
  /**
@@ -955,7 +955,9 @@ class CesiumMap extends VcsMap {
955
955
  */
956
956
  removeDataSource(dataSource) {
957
957
  this.removeVisualization(dataSource);
958
- this.dataSourceDisplay.dataSources.remove(dataSource);
958
+ if (!this.dataSourceDisplay.isDestroyed() && !this.dataSourceDisplay.dataSources.isDestroyed()) {
959
+ this.dataSourceDisplay.dataSources.remove(dataSource);
960
+ }
959
961
  }
960
962
 
961
963
  /**
@@ -991,21 +993,12 @@ class CesiumMap extends VcsMap {
991
993
  }
992
994
 
993
995
  /**
994
- * returns the cesium Viewer Object
996
+ * returns the cesium Scene Object, returns null on non initialized or destroyed maps
995
997
  * @returns {import("@vcmap/cesium").Scene}
996
998
  * @api stable
997
999
  */
998
1000
  getScene() {
999
- return this._cesiumWidget.scene;
1000
- }
1001
-
1002
- /**
1003
- * @returns {import("@vcmap/cesium").CesiumWidget|*}
1004
- * @deprecated 3.7
1005
- */
1006
- getViewer() {
1007
- this.getLogger().deprecate('getViewer', 'use getCesiumWidget instead.');
1008
- return this._cesiumWidget;
1001
+ return this._cesiumWidget?.scene;
1009
1002
  }
1010
1003
 
1011
1004
  /**
@@ -1024,17 +1017,6 @@ class CesiumMap extends VcsMap {
1024
1017
  return false;
1025
1018
  }
1026
1019
 
1027
- // TODO cesium map requestRender
1028
- /**
1029
- * sets the Cesium debug mode.
1030
- * @api stable
1031
- * @deprecated v4.1
1032
- */
1033
- setDebugMode() {
1034
- this.getLogger().deprecate('setDebugMode', 'set the debug property directly');
1035
- this.debug = true;
1036
- }
1037
-
1038
1020
  /**
1039
1021
  * @private
1040
1022
  */
@@ -1056,7 +1038,7 @@ class CesiumMap extends VcsMap {
1056
1038
 
1057
1039
  /**
1058
1040
  * is called when the cesium Terrainprovider changes. Sets the .terrainProvider and deactivates currently
1059
- * active Terrain layer if necessary
1041
+ * active TerrainLayer layer if necessary
1060
1042
  * @param {import("@vcmap/cesium").TerrainProvider} terrainProvider
1061
1043
  * @private
1062
1044
  */
@@ -1165,6 +1147,9 @@ class CesiumMap extends VcsMap {
1165
1147
  if (this._removeClusterClockTickListener) {
1166
1148
  this._removeClusterClockTickListener();
1167
1149
  }
1150
+
1151
+ [...this.layerCollection].forEach((l) => { l.removedFromMap(this); });
1152
+
1168
1153
  if (this._clusterDataSourceDisplay) {
1169
1154
  this._clusterDataSourceDisplay.destroy();
1170
1155
  }
File without changes