@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
@@ -27,7 +27,16 @@ import { EventType, ModificationKeyType, PointerKeyType } from './interactionTyp
27
27
  * @api
28
28
  */
29
29
  class AbstractInteraction {
30
- constructor() {
30
+ /**
31
+ * @param {number} [defaultActive=EventType.NONE] - A bitmask representing the default {@link EventType} to listen to
32
+ * @param {number} [defaultModificationKey=ModificationKeyType.NONE] - A bitmask representing the default {@link ModificationKeyType} keys to listen to
33
+ * @param {number} [defaultPointerKey=PointerKeyType.LEFT] - A bitmask representing the {@link PointerKeyType} pointer key to listen to
34
+ */
35
+ constructor(
36
+ defaultActive = EventType.NONE,
37
+ defaultModificationKey = ModificationKeyType.NONE,
38
+ defaultPointerKey = PointerKeyType.LEFT,
39
+ ) {
31
40
  /**
32
41
  * A unique identifier for this interaction
33
42
  * @type {string}
@@ -36,13 +45,10 @@ class AbstractInteraction {
36
45
  this.id = uuidv4();
37
46
 
38
47
  /**
39
- * A bitmask representing the default events to listen to
40
- * {@link EventType}, default is NONE
41
48
  * @type {number}
42
- * @protected
43
- * @api
49
+ * @private
44
50
  */
45
- this._defaultActive = EventType.NONE;
51
+ this._defaultActive = defaultActive;
46
52
 
47
53
  /**
48
54
  * The current active bitmask for {@link EventType}
@@ -52,13 +58,10 @@ class AbstractInteraction {
52
58
  this.active = this._defaultActive;
53
59
 
54
60
  /**
55
- * The default bitmask for modification keys to listen to,
56
- * {@link ModificationKeyType} default is NONE
57
61
  * @type {number}
58
- * @protected
59
- * @api
62
+ * @private
60
63
  */
61
- this._defaultModificationKey = ModificationKeyType.NONE;
64
+ this._defaultModificationKey = defaultModificationKey;
62
65
 
63
66
  /**
64
67
  * The current active {@link ModificationKeyType}
@@ -68,11 +71,10 @@ class AbstractInteraction {
68
71
  this.modificationKey = this._defaultModificationKey;
69
72
 
70
73
  /**
71
- * default bitmask for pointer key {@link PointerKeyType}, starting value is LEFT
72
74
  * @type {number}
73
- * @protected
75
+ * @private
74
76
  */
75
- this._defaultPointerKey = PointerKeyType.LEFT;
77
+ this._defaultPointerKey = defaultPointerKey;
76
78
 
77
79
  /**
78
80
  * The currently active {@link PointerKeyType}
@@ -114,7 +116,7 @@ class AbstractInteraction {
114
116
  }
115
117
 
116
118
  /**
117
- * Sets the modification key to listen to
119
+ * Sets the modification key to listen to or the default modification key if none is provided.
118
120
  * @param {number=} mod
119
121
  * @api
120
122
  */
@@ -127,8 +129,8 @@ class AbstractInteraction {
127
129
  }
128
130
 
129
131
  /**
130
- * Sets the pointer key for this interaction$
131
- * @param {number} pointer
132
+ * Sets the pointer key for this interaction or the default pointer if none is provided.
133
+ * @param {number=} pointer
132
134
  * @api
133
135
  */
134
136
  setPointer(pointer) {
@@ -10,7 +10,7 @@ import { transformFromImage } from '../oblique/helpers.js';
10
10
  */
11
11
  class CoordinateAtPixel extends AbstractInteraction {
12
12
  constructor() {
13
- super();
13
+ super(EventType.ALL, ModificationKeyType.ALL);
14
14
  /**
15
15
  * @type {import("@vcmap/cesium").Cartographic}
16
16
  * @private
@@ -22,9 +22,6 @@ class CoordinateAtPixel extends AbstractInteraction {
22
22
  */
23
23
  this._scratchCartesian = new Cartesian3();
24
24
 
25
- this._defaultActive = EventType.ALL;
26
- this._defaultModificationKey = ModificationKeyType.ALL;
27
-
28
25
  this.setActive();
29
26
  }
30
27
 
@@ -35,9 +32,9 @@ class CoordinateAtPixel extends AbstractInteraction {
35
32
  */
36
33
  // eslint-disable-next-line class-methods-use-this
37
34
  async pipe(event) {
38
- if (event.map.className === 'vcs.vcm.maps.Cesium') {
35
+ if (event.map.className === 'CesiumMap') {
39
36
  return this._cesiumHandler(event);
40
- } else if (event.map.className === 'vcs.vcm.maps.Oblique') {
37
+ } else if (event.map.className === 'ObliqueMap') {
41
38
  return CoordinateAtPixel.obliqueHandler(event);
42
39
  }
43
40
  return event;
@@ -74,10 +71,10 @@ class CoordinateAtPixel extends AbstractInteraction {
74
71
  * @private
75
72
  */
76
73
  static obliqueHandler(event) {
77
- const obliqueMap = /** @type {import("@vcmap/core").Oblique} */ (event.map);
74
+ const obliqueMap = /** @type {import("@vcmap/core").ObliqueMap} */ (event.map);
78
75
  const image = obliqueMap.currentImage;
79
76
  if (image) {
80
- // don't use Terrain for coordinate Transformation if the event is a move or drag event,
77
+ // don't use TerrainLayer for coordinate Transformation if the event is a move or drag event,
81
78
  // to avoid requesting the terrain each mousemove...
82
79
  // XXX but what about DRAGSTART and DRAGEND? this could be usefull, no?
83
80
  const move = event.type & (EventType.MOVE ^ EventType.DRAGEVENTS);
@@ -9,7 +9,7 @@ import CoordinateAtPixel from './coordinateAtPixel.js';
9
9
  import FeatureAtPixelInteraction from './featureAtPixelInteraction.js';
10
10
  import { EventType, PointerEventType } from './interactionType.js';
11
11
  import FeatureProviderInteraction from './featureProviderInteraction.js';
12
- import VcsEvent from '../event/vcsEvent.js';
12
+ import VcsEvent from '../vcsEvent.js';
13
13
 
14
14
  /**
15
15
  * @namespace interaction
@@ -31,7 +31,7 @@ import VcsEvent from '../event/vcsEvent.js';
31
31
  * @property {import("@vcmap/core").ModificationKeyType} key
32
32
  * @property {import("@vcmap/core").PointerKeyType} pointer
33
33
  * @property {import("ol/coordinate").Coordinate|undefined} position - position in web mercator coordinates
34
- * @property {import("ol/coordinate").Coordinate|undefined} positionOrPixel - position in web mercator coordinates or image coordinates in Oblique Map Mode
34
+ * @property {import("ol/coordinate").Coordinate|undefined} positionOrPixel - position in web mercator coordinates or image coordinates in ObliqueMap Map Mode
35
35
  * @property {boolean|undefined} multipleTouch - vcs:undocumented
36
36
  * @property {number|null|undefined} time - vcs:undocumented
37
37
  */
@@ -47,7 +47,7 @@ import VcsEvent from '../event/vcsEvent.js';
47
47
  * @returns {import("@vcsuite/logger").Logger}
48
48
  */
49
49
  function getLogger() {
50
- return getLoggerByName('vcs.vcm.interaction.EventHandler');
50
+ return getLoggerByName('EventHandler');
51
51
  }
52
52
 
53
53
  /**
@@ -12,7 +12,7 @@ import { originalFeatureSymbol } from '../layer/vectorSymbols.js';
12
12
  */
13
13
  class FeatureAtPixelInteraction extends AbstractInteraction {
14
14
  constructor() {
15
- super();
15
+ super(EventType.ALL ^ EventType.MOVE, ModificationKeyType.ALL);
16
16
  /**
17
17
  * @type {EventType|number}
18
18
  * @private
@@ -47,19 +47,6 @@ class FeatureAtPixelInteraction extends AbstractInteraction {
47
47
  */
48
48
  this.hitTolerance = 10;
49
49
 
50
- /**
51
- * @inheritDoc
52
- * @type {ModificationKeyType|number}
53
- * @protected
54
- */
55
- this._defaultModificationKey = ModificationKeyType.ALL;
56
- /**
57
- * @inheritDoc
58
- * @type {ModificationKeyType|number}
59
- * @protected
60
- */
61
- this._defaultActive = EventType.ALL ^ EventType.MOVE;
62
-
63
50
  /**
64
51
  * @type {import("ol").Feature<import("ol/geom/Geometry").default>|Object|null}
65
52
  * @private
@@ -113,11 +100,11 @@ class FeatureAtPixelInteraction extends AbstractInteraction {
113
100
  this._draggingFeature = null;
114
101
  }
115
102
 
116
- if (event.map.className === 'vcs.vcm.maps.Openlayers') {
103
+ if (event.map.className === 'OpenlayersMap') {
117
104
  await this._openlayersHandler(event);
118
- } else if (event.map.className === 'vcs.vcm.maps.Oblique') {
105
+ } else if (event.map.className === 'ObliqueMap') {
119
106
  await this._obliqueHandler(event);
120
- } else if (event.map.className === 'vcs.vcm.maps.Cesium') {
107
+ } else if (event.map.className === 'CesiumMap') {
121
108
  await this._cesiumHandler(event);
122
109
  }
123
110
  if (event.type & EventType.DRAGSTART && event.feature) {
@@ -152,7 +139,7 @@ class FeatureAtPixelInteraction extends AbstractInteraction {
152
139
  let found = null;
153
140
  /** @type {null|import("ol/layer/Layer").default} */
154
141
  let foundLayer = null;
155
- /** @type {import("@vcmap/core").Openlayers} */ (event.map).olMap
142
+ /** @type {import("@vcmap/core").OpenlayersMap} */ (event.map).olMap
156
143
  .forEachFeatureAtPixel([event.windowPosition.x, event.windowPosition.y], (feat, layer) => {
157
144
  if (feat && (feat.get('olcs_allowPicking') == null || feat.get('olcs_allowPicking') === true)) {
158
145
  found = /** @type {import("ol").Feature<import("ol/geom/Geometry").default>} */ (feat);
@@ -180,7 +167,7 @@ class FeatureAtPixelInteraction extends AbstractInteraction {
180
167
  let found = null;
181
168
  /** @type {null|import("ol/layer/Layer").default} */
182
169
  let foundLayer = null;
183
- /** @type {import("@vcmap/core").Oblique} */ (event.map).olMap
170
+ /** @type {import("@vcmap/core").ObliqueMap} */ (event.map).olMap
184
171
  .forEachFeatureAtPixel([event.windowPosition.x, event.windowPosition.y], (feat, layer) => {
185
172
  if (feat) {
186
173
  found = feat[originalFeatureSymbol] || feat;
@@ -7,19 +7,8 @@ import { EventType, ModificationKeyType } from './interactionType.js';
7
7
  */
8
8
  class FeatureProviderInteraction extends AbstractInteraction {
9
9
  constructor() {
10
- super();
11
- /**
12
- * @inheritDoc
13
- * @type {ModificationKeyType|number}
14
- * @protected
15
- */
16
- this._defaultModificationKey = ModificationKeyType.ALL;
17
- /**
18
- * @inheritDoc
19
- * @type {ModificationKeyType|number}
20
- * @protected
21
- */
22
- this._defaultActive = EventType.CLICK;
10
+ super(EventType.CLICK, ModificationKeyType.ALL);
11
+
23
12
  this.setActive();
24
13
  }
25
14
 
@@ -11,31 +11,13 @@ class InteractionChain extends AbstractInteraction {
11
11
  * @param {Array<AbstractInteraction>=} chain
12
12
  */
13
13
  constructor(chain) {
14
- super();
14
+ super(EventType.ALL, ModificationKeyType.ALL, PointerKeyType.ALL);
15
15
  /**
16
16
  * The interactions to handle one after the other
17
17
  * @type {Array<AbstractInteraction>}
18
18
  * @api
19
19
  */
20
20
  this.chain = chain || [];
21
- /**
22
- * @inheritDoc
23
- * @type {EventType}
24
- * @protected
25
- */
26
- this._defaultActive = EventType.ALL;
27
- /**
28
- * @inheritDoc
29
- * @type {ModificationKeyType}
30
- * @protected
31
- */
32
- this._defaultModificationKey = ModificationKeyType.ALL;
33
- /**
34
- * @inheritDoc
35
- * @type {PointerKeyType}
36
- * @protected
37
- */
38
- this._defaultPointerKey = PointerKeyType.ALL;
39
21
  this.setActive();
40
22
  }
41
23
 
@@ -72,8 +54,8 @@ class InteractionChain extends AbstractInteraction {
72
54
  * @param {InteractionEvent} event
73
55
  * @returns {Promise<InteractionEvent>}
74
56
  */
75
- pipe(event) {
76
- let promise = Promise.resolve(event);
57
+ async pipe(event) {
58
+ let pipedEvent = event;
77
59
  const chainLength = this.chain.length;
78
60
  for (let i = 0; i < chainLength; i++) {
79
61
  const interaction = this.chain[i];
@@ -82,16 +64,14 @@ class InteractionChain extends AbstractInteraction {
82
64
  (interaction.modificationKey & event.key) &&
83
65
  (interaction.pointerKey & event.pointer)
84
66
  ) {
85
- // eslint-disable-next-line
86
- promise = promise.then(function (pipedEvent) {
87
- if (pipedEvent.stopPropagation) {
88
- return Promise.resolve(pipedEvent);
89
- }
90
- return this.pipe(pipedEvent);
91
- }.bind(interaction));
67
+ // eslint-disable-next-line no-await-in-loop
68
+ pipedEvent = await interaction.pipe(pipedEvent);
69
+ if (pipedEvent.stopPropagation) {
70
+ break;
71
+ }
92
72
  }
93
73
  }
94
- return promise;
74
+ return pipedEvent;
95
75
  }
96
76
 
97
77
  /**
@@ -99,7 +79,7 @@ class InteractionChain extends AbstractInteraction {
99
79
  * @override
100
80
  */
101
81
  setModification() {
102
- this.modificationKey = this._defaultModificationKey;
82
+ super.setModification();
103
83
  }
104
84
 
105
85
  /**
@@ -107,7 +87,7 @@ class InteractionChain extends AbstractInteraction {
107
87
  * @override
108
88
  */
109
89
  setPointer() {
110
- this.pointerKey = this._defaultPointerKey;
90
+ super.setPointer();
111
91
  }
112
92
 
113
93
  /**
@@ -64,9 +64,9 @@ export function getExtentFromTileset(cesium3DTileset) {
64
64
  * @implements {FeatureLayerImplementation}
65
65
  * @api stable
66
66
  */
67
- class CesiumTilesetCesium extends LayerImplementation {
67
+ class CesiumTilesetCesiumImpl extends LayerImplementation {
68
68
  /** @type {string} */
69
- static get className() { return 'vcs.vcm.layer.cesium.CesiumTilesetCesium'; }
69
+ static get className() { return 'CesiumTilesetCesiumImpl'; }
70
70
 
71
71
  /**
72
72
  * @param {import("@vcmap/core").CesiumMap} map
@@ -356,4 +356,4 @@ class CesiumTilesetCesium extends LayerImplementation {
356
356
  }
357
357
  }
358
358
 
359
- export default CesiumTilesetCesium;
359
+ export default CesiumTilesetCesiumImpl;
@@ -28,7 +28,10 @@ function synchronizeEntityCollections(source, destination) {
28
28
  * @export
29
29
  * @extends {LayerImplementation<import("@vcmap/core").CesiumMap>}}
30
30
  */
31
- class DataSourceCesium extends LayerImplementation {
31
+ class DataSourceCesiumImpl extends LayerImplementation {
32
+ /** @type {string} */
33
+ static get className() { return 'DataSourceCesiumImpl'; }
34
+
32
35
  /**
33
36
  * @param {import("@vcmap/core").CesiumMap} map
34
37
  * @param {DataSourceImplementationOptions} options
@@ -168,4 +171,4 @@ class DataSourceCesium extends LayerImplementation {
168
171
  }
169
172
  }
170
173
 
171
- export default DataSourceCesium;
174
+ export default DataSourceCesiumImpl;
@@ -1,14 +1,14 @@
1
1
  import { OpenStreetMapImageryProvider, ImageryLayer as CesiumImageryLayer } from '@vcmap/cesium';
2
- import RasterLayerCesium from './rasterLayerCesium.js';
2
+ import RasterLayerCesiumImpl from './rasterLayerCesiumImpl.js';
3
3
 
4
4
  /**
5
- * represents a specific OpenStreetMap layer for cesium.
5
+ * represents a specific OpenStreetMapLayer layer for cesium.
6
6
  * @class
7
7
  * @export
8
- * @extends {RasterLayerCesium}
8
+ * @extends {RasterLayerCesiumImpl}
9
9
  */
10
- class OpenStreetMapCesium extends RasterLayerCesium {
11
- static get className() { return 'vcs.vcm.layer.cesium.OpenStreetMapCesium'; }
10
+ class OpenStreetMapCesiumImpl extends RasterLayerCesiumImpl {
11
+ static get className() { return 'OpenStreetMapCesiumImpl'; }
12
12
 
13
13
  /**
14
14
  * @inheritDoc
@@ -26,4 +26,4 @@ class OpenStreetMapCesium extends RasterLayerCesium {
26
26
  }
27
27
 
28
28
 
29
- export default OpenStreetMapCesium;
29
+ export default OpenStreetMapCesiumImpl;
@@ -1,8 +1,8 @@
1
1
  import { Cesium3DTileStyle } from '@vcmap/cesium';
2
- import CesiumTilesetCesium from './cesiumTilesetCesium.js';
2
+ import CesiumTilesetCesiumImpl from './cesiumTilesetCesiumImpl.js';
3
3
 
4
4
  /**
5
- * represents a specific PointCloud layer for cesium.
5
+ * represents a specific PointCloudLayer layer for cesium.
6
6
  * <h3>Config Parameter</h3>
7
7
  * <ul>
8
8
  * <li>url: string: url to the p3dm dataset
@@ -11,11 +11,11 @@ import CesiumTilesetCesium from './cesiumTilesetCesium.js';
11
11
  *
12
12
  * @class
13
13
  * @export
14
- * @extends {CesiumTilesetCesium}
14
+ * @extends {CesiumTilesetCesiumImpl}
15
15
  * @api stable
16
16
  */
17
- class PointCloudCesium extends CesiumTilesetCesium {
18
- static get className() { return 'vcs.vcm.layer.cesium.PointCloud'; }
17
+ class PointCloudCesiumImpl extends CesiumTilesetCesiumImpl {
18
+ static get className() { return 'PointCloudCesiumImpl'; }
19
19
 
20
20
  /**
21
21
  * @param {import("@vcmap/core").CesiumMap} map
@@ -55,4 +55,4 @@ class PointCloudCesium extends CesiumTilesetCesium {
55
55
  }
56
56
  }
57
57
 
58
- export default PointCloudCesium;
58
+ export default PointCloudCesiumImpl;
@@ -8,8 +8,8 @@ import LayerImplementation from '../layerImplementation.js';
8
8
  * @extends {LayerImplementation<import("@vcmap/core").CesiumMap>}}
9
9
  * @implements {RasterLayerImplementation}
10
10
  */
11
- class RasterLayerCesium extends LayerImplementation {
12
- static get className() { return 'vcs.vcm.layer.cesium.RasterLayerCesium'; }
11
+ class RasterLayerCesiumImpl extends LayerImplementation {
12
+ static get className() { return 'RasterLayerCesiumImpl'; }
13
13
 
14
14
  /**
15
15
  * @param {import("@vcmap/core").CesiumMap} map
@@ -107,4 +107,4 @@ class RasterLayerCesium extends LayerImplementation {
107
107
  }
108
108
  }
109
109
 
110
- export default RasterLayerCesium;
110
+ export default RasterLayerCesiumImpl;
@@ -1,15 +1,15 @@
1
1
  import { Rectangle, SingleTileImageryProvider, ImageryLayer } from '@vcmap/cesium';
2
- import RasterLayerCesium from './rasterLayerCesium.js';
2
+ import RasterLayerCesiumImpl from './rasterLayerCesiumImpl.js';
3
3
  import { wgs84Projection } from '../../util/projection.js';
4
4
 
5
5
  /**
6
6
  * represents a specific Cesium SingleTileImagery Layer class.
7
7
  * @class
8
8
  * @export
9
- * @extends {RasterLayerCesium}
9
+ * @extends {RasterLayerCesiumImpl}
10
10
  */
11
- class SingleImageCesium extends RasterLayerCesium {
12
- static get className() { return 'vcs.vcm.layer.cesium.singleImageLayer'; }
11
+ class SingleImageCesiumImpl extends RasterLayerCesiumImpl {
12
+ static get className() { return 'SingleImageCesiumImpl'; }
13
13
 
14
14
  /**
15
15
  * @param {import("@vcmap/core").CesiumMap} map
@@ -46,4 +46,4 @@ class SingleImageCesium extends RasterLayerCesium {
46
46
  }
47
47
  }
48
48
 
49
- export default SingleImageCesium;
49
+ export default SingleImageCesiumImpl;
@@ -4,13 +4,13 @@ import { getTerrainProviderForUrl } from '../terrainHelpers.js';
4
4
 
5
5
 
6
6
  /**
7
- * Terrain implementation for {@link CesiumMap}
7
+ * TerrainLayer implementation for {@link CesiumMap}
8
8
  * @class
9
9
  * @export
10
10
  * @extends {LayerImplementation<import("@vcmap/core").CesiumMap>}}
11
11
  */
12
- class TerrainCesium extends LayerImplementation {
13
- static get className() { return 'vcs.vcm.layer.cesium.TerrainCesium'; }
12
+ class TerrainCesiumImpl extends LayerImplementation {
13
+ static get className() { return 'TerrainCesiumImpl'; }
14
14
 
15
15
  /**
16
16
  * @param {import("@vcmap/core").CesiumMap} map
@@ -77,4 +77,4 @@ class TerrainCesium extends LayerImplementation {
77
77
  }
78
78
  }
79
79
 
80
- export default TerrainCesium;
80
+ export default TerrainCesiumImpl;
@@ -1,16 +1,16 @@
1
1
  import { Rectangle, GeographicTilingScheme, TileMapServiceImageryProvider, ImageryLayer as CesiumImageryLayer } from '@vcmap/cesium';
2
- import RasterLayerCesium from './rasterLayerCesium.js';
2
+ import RasterLayerCesiumImpl from './rasterLayerCesiumImpl.js';
3
3
  import { wgs84Projection } from '../../util/projection.js';
4
4
  import { TilingScheme } from '../rasterLayer.js';
5
5
 
6
6
  /**
7
- * TMS implementation for {@link CesiumMap}.
7
+ * TmsLayer implementation for {@link CesiumMap}.
8
8
  * @class
9
9
  * @export
10
- * @extends {RasterLayerCesium}
10
+ * @extends {RasterLayerCesiumImpl}
11
11
  */
12
- class TMSCesium extends RasterLayerCesium {
13
- static get className() { return 'vcs.vcm.layer.cesium.TMSCesium'; }
12
+ class TmsCesiumImpl extends RasterLayerCesiumImpl {
13
+ static get className() { return 'TmsCesiumImpl'; }
14
14
 
15
15
  /**
16
16
  * @param {import("@vcmap/core").CesiumMap} map
@@ -51,4 +51,4 @@ class TMSCesium extends RasterLayerCesium {
51
51
  }
52
52
  }
53
53
 
54
- export default TMSCesium;
54
+ export default TmsCesiumImpl;
@@ -15,8 +15,8 @@ import { synchronizeFeatureVisibilityWithSource } from '../vectorHelpers.js';
15
15
  * @extends {LayerImplementation<import("@vcmap/core").CesiumMap>}}
16
16
  * @implements {FeatureLayerImplementation}
17
17
  */
18
- class VectorCesium extends LayerImplementation {
19
- static get className() { return 'vcs.vcm.layer.cesium.VectorCesium'; }
18
+ class VectorCesiumImpl extends LayerImplementation {
19
+ static get className() { return 'VectorCesiumImpl'; }
20
20
 
21
21
  /**
22
22
  * @param {import("@vcmap/core").CesiumMap} map
@@ -252,4 +252,4 @@ class VectorCesium extends LayerImplementation {
252
252
  }
253
253
  }
254
254
 
255
- export default VectorCesium;
255
+ export default VectorCesiumImpl;
@@ -1,18 +1,18 @@
1
1
  import { ImageryLayer as CesiumImageryLayer, Rectangle } from '@vcmap/cesium';
2
2
  import VectorTileImageryProvider from './vectorTileImageryProvider.js';
3
- import RasterLayerCesium from './rasterLayerCesium.js';
3
+ import RasterLayerCesiumImpl from './rasterLayerCesiumImpl.js';
4
4
  import { wgs84Projection } from '../../util/projection.js';
5
5
 
6
6
  /**
7
7
  * represents a rasterized tiled vector layer implementation for cesium.
8
8
  * @class
9
9
  * @export
10
- * @extends {RasterLayerCesium}
10
+ * @extends {RasterLayerCesiumImpl}
11
11
  * @implements {VectorTileImplementation}
12
12
  */
13
- class VectorRasterTileCesium extends RasterLayerCesium {
13
+ class VectorRasterTileCesiumImpl extends RasterLayerCesiumImpl {
14
14
  static get className() {
15
- return 'vcs.vcm.layer.cesium.VectorRasterTileCesium';
15
+ return 'VectorRasterTileCesiumImpl';
16
16
  }
17
17
 
18
18
  /**
@@ -113,4 +113,4 @@ class VectorRasterTileCesium extends RasterLayerCesium {
113
113
  }
114
114
  }
115
115
 
116
- export default VectorRasterTileCesium;
116
+ export default VectorRasterTileCesiumImpl;
@@ -2,7 +2,7 @@ import { Event as CesiumEvent, Rectangle, Math as CesiumMath } from '@vcmap/cesi
2
2
  import { compose, create as createTransform, scale as scaleTransform } from 'ol/transform.js';
3
3
  import { rectangleToExtent } from '../tileProvider/tileProvider.js';
4
4
  import { wgs84ToMercatorTransformer } from '../../util/projection.js';
5
- import CanvasTileRenderer from '../../../../ol/render/canvas/canvasTileRenderer.js';
5
+ import CanvasTileRenderer from '../../ol/render/canvas/canvasTileRenderer.js';
6
6
 
7
7
  /**
8
8
  * @param {import("ol/extent").Extent} extent
@@ -1,16 +1,16 @@
1
1
  import { ImageryLayer as CesiumImageryLayer, Rectangle, WebMercatorTilingScheme, WebMapServiceImageryProvider } from '@vcmap/cesium';
2
2
 
3
- import RasterLayerCesium from './rasterLayerCesium.js';
3
+ import RasterLayerCesiumImpl from './rasterLayerCesiumImpl.js';
4
4
  import { wgs84Projection } from '../../util/projection.js';
5
5
 
6
6
  /**
7
- * represents a specific Cesium WMSCesium Layer class.
7
+ * represents a specific Cesium WmsCesiumImpl Layer class.
8
8
  * @class
9
9
  * @export
10
- * @extends {RasterLayerCesium}
10
+ * @extends {RasterLayerCesiumImpl}
11
11
  */
12
- class WMSCesium extends RasterLayerCesium {
13
- static get className() { return 'vcs.vcm.layer.cesium.WMSCesium'; }
12
+ class WmsCesiumImpl extends RasterLayerCesiumImpl {
13
+ static get className() { return 'WmsCesiumImpl'; }
14
14
 
15
15
  /**
16
16
  * @param {import("@vcmap/core").CesiumMap} map
@@ -68,4 +68,4 @@ class WMSCesium extends RasterLayerCesium {
68
68
  }
69
69
  }
70
70
 
71
- export default WMSCesium;
71
+ export default WmsCesiumImpl;
@@ -1,16 +1,16 @@
1
1
  import { Rectangle, WebMapTileServiceImageryProvider, ImageryLayer as CesiumImageryLayer } from '@vcmap/cesium';
2
- import RasterLayerCesium from './rasterLayerCesium.js';
2
+ import RasterLayerCesiumImpl from './rasterLayerCesiumImpl.js';
3
3
  import { wgs84Projection } from '../../util/projection.js';
4
4
  import { getTilingScheme } from '../rasterLayer.js';
5
5
 
6
6
  /**
7
- * represents a specific WMTS Implementation for {@link CesiumMap}.
7
+ * represents a specific WmtsLayer Implementation for {@link CesiumMap}.
8
8
  * @class
9
9
  * @export
10
- * @extends {RasterLayerCesium}
10
+ * @extends {RasterLayerCesiumImpl}
11
11
  */
12
- class WMTSCesium extends RasterLayerCesium {
13
- static get className() { return 'vcs.vcm.layer.cesium.WMTSCesium'; }
12
+ class WmtsCesiumImpl extends RasterLayerCesiumImpl {
13
+ static get className() { return 'WmtsCesiumImpl'; }
14
14
 
15
15
  /**
16
16
  * @param {import("@vcmap/core").CesiumMap} map
@@ -98,4 +98,4 @@ class WMTSCesium extends RasterLayerCesium {
98
98
  }
99
99
  }
100
100
 
101
- export default WMTSCesium;
101
+ export default WmtsCesiumImpl;