@vcmap/core 5.0.0-rc.1 → 5.0.0-rc.12

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 (185) hide show
  1. package/LICENSE.md +1 -1
  2. package/README.md +3 -2
  3. package/index.d.ts +2085 -1969
  4. package/index.js +137 -131
  5. package/package.json +14 -22
  6. package/src/category/appBackedCategory.js +76 -0
  7. package/src/category/category.js +417 -0
  8. package/src/category/categoryCollection.js +145 -0
  9. package/src/cesium/cesium3DTileFeature.js +1 -1
  10. package/src/classRegistry.js +162 -0
  11. package/src/context.js +72 -0
  12. package/src/{vcs/vcm/util/featureProvider → featureProvider}/abstractFeatureProvider.js +8 -9
  13. package/src/{vcs/vcm/util/featureProvider → featureProvider}/featureProviderHelpers.js +4 -5
  14. package/src/{vcs/vcm/util/featureProvider → featureProvider}/featureProviderSymbols.js +0 -0
  15. package/src/{vcs/vcm/util/featureProvider → featureProvider}/tileProviderFeatureProvider.js +4 -2
  16. package/src/{vcs/vcm/util/featureProvider → featureProvider}/wmsFeatureProvider.js +25 -18
  17. package/src/{vcs/vcm/interaction → interaction}/abstractInteraction.js +19 -18
  18. package/src/{vcs/vcm/interaction → interaction}/coordinateAtPixel.js +6 -9
  19. package/src/{vcs/vcm/interaction → interaction}/eventHandler.js +3 -3
  20. package/src/{vcs/vcm/interaction → interaction}/featureAtPixelInteraction.js +6 -19
  21. package/src/{vcs/vcm/interaction → interaction}/featureProviderInteraction.js +2 -13
  22. package/src/{vcs/vcm/interaction → interaction}/interactionChain.js +11 -32
  23. package/src/{vcs/vcm/interaction → interaction}/interactionType.js +1 -5
  24. package/src/{vcs/vcm/layer/cesium/cesiumTilesetCesium.js → layer/cesium/cesiumTilesetCesiumImpl.js} +10 -13
  25. package/src/{vcs/vcm/layer → layer}/cesium/clusterContext.js +0 -0
  26. package/src/{vcs/vcm/layer/cesium/dataSourceCesium.js → layer/cesium/dataSourceCesiumImpl.js} +5 -3
  27. package/src/{vcs/vcm/layer/cesium/openStreetMapCesium.js → layer/cesium/openStreetMapCesiumImpl.js} +6 -7
  28. package/src/{vcs/vcm/layer/cesium/rasterLayerCesium.js → layer/cesium/rasterLayerCesiumImpl.js} +5 -6
  29. package/src/{vcs/vcm/layer/cesium/singleImageCesium.js → layer/cesium/singleImageCesiumImpl.js} +5 -6
  30. package/src/{vcs/vcm/layer/cesium/terrainCesium.js → layer/cesium/terrainCesiumImpl.js} +4 -5
  31. package/src/{vcs/vcm/layer/cesium/tmsCesium.js → layer/cesium/tmsCesiumImpl.js} +6 -7
  32. package/src/{vcs/vcm/layer/cesium/vectorCesium.js → layer/cesium/vectorCesiumImpl.js} +6 -7
  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 -6
  35. package/src/{vcs/vcm/layer → layer}/cesium/vectorTileImageryProvider.js +1 -2
  36. package/src/{vcs/vcm/layer/cesium/wmsCesium.js → layer/cesium/wmsCesiumImpl.js} +6 -7
  37. package/src/{vcs/vcm/layer/cesium/wmtsCesium.js → layer/cesium/wmtsCesiumImpl.js} +6 -7
  38. package/src/{vcs/vcm/layer → layer}/cesium/x3dmHelper.js +0 -0
  39. package/src/{vcs/vcm/layer/cesiumTileset.js → layer/cesiumTilesetLayer.js} +38 -37
  40. package/src/{vcs/vcm/layer/czml.js → layer/czmlLayer.js} +14 -17
  41. package/src/{vcs/vcm/layer/dataSource.js → layer/dataSourceLayer.js} +38 -29
  42. package/src/{vcs/vcm/layer → layer}/featureLayer.js +27 -31
  43. package/src/{vcs/vcm/layer/featureStore.js → layer/featureStoreLayer.js} +54 -54
  44. package/src/{vcs/vcm/layer/featureStoreChanges.js → layer/featureStoreLayerChanges.js} +98 -82
  45. package/src/{vcs/vcm/layer/featureStoreState.js → layer/featureStoreLayerState.js} +1 -2
  46. package/src/{vcs/vcm/layer → layer}/featureVisibility.js +9 -6
  47. package/src/{vcs/vcm/layer → layer}/geojsonHelpers.js +15 -41
  48. package/src/{vcs/vcm/layer/geojson.js → layer/geojsonLayer.js} +19 -22
  49. package/src/{vcs/vcm/layer → layer}/globalHider.js +8 -32
  50. package/src/{vcs/vcm/layer → layer}/layer.js +63 -20
  51. package/src/{vcs/vcm/layer → layer}/layerImplementation.js +2 -3
  52. package/src/{vcs/vcm/layer → layer}/layerState.js +0 -1
  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 +2 -2
  56. package/src/{vcs/vcm/layer/oblique/vectorOblique.js → layer/oblique/vectorObliqueImpl.js} +7 -9
  57. package/src/{vcs/vcm/layer/openStreetMap.js → layer/openStreetMapLayer.js} +32 -33
  58. package/src/{vcs/vcm/layer/openlayers/layerOpenlayers.js → layer/openlayers/layerOpenlayersImpl.js} +5 -6
  59. package/src/layer/openlayers/openStreetMapOpenlayersImpl.js +26 -0
  60. package/src/{vcs/vcm/layer/openlayers/rasterLayerOpenlayers.js → layer/openlayers/rasterLayerOpenlayersImpl.js} +15 -14
  61. package/src/{vcs/vcm/layer/openlayers/singleImageOpenlayers.js → layer/openlayers/singleImageOpenlayersImpl.js} +6 -7
  62. package/src/{vcs/vcm/layer/openlayers/tileDebugOpenlayers.js → layer/openlayers/tileDebugOpenlayersImpl.js} +5 -6
  63. package/src/{vcs/vcm/layer/openlayers/tmsOpenlayers.js → layer/openlayers/tmsOpenlayersImpl.js} +7 -8
  64. package/src/{vcs/vcm/layer/openlayers/vectorOpenlayers.js → layer/openlayers/vectorOpenlayersImpl.js} +8 -9
  65. package/src/{vcs/vcm/layer/openlayers/vectorTileOpenlayers.js → layer/openlayers/vectorTileOpenlayersImpl.js} +6 -7
  66. package/src/{vcs/vcm/layer/openlayers/wmsOpenlayers.js → layer/openlayers/wmsOpenlayersImpl.js} +7 -8
  67. package/src/{vcs/vcm/layer/openlayers/wmtsOpenlayers.js → layer/openlayers/wmtsOpenlayersImpl.js} +7 -8
  68. package/src/{vcs/vcm/layer/pointCloud.js → layer/pointCloudLayer.js} +26 -34
  69. package/src/{vcs/vcm/layer → layer}/rasterLayer.js +18 -20
  70. package/src/{vcs/vcm/layer/singleImage.js → layer/singleImageLayer.js} +20 -20
  71. package/src/{vcs/vcm/layer → layer}/terrainHelpers.js +13 -49
  72. package/src/{vcs/vcm/layer/terrain.js → layer/terrainLayer.js} +13 -14
  73. package/src/{vcs/vcm/layer → layer}/tileLoadedHelper.js +5 -5
  74. package/src/{vcs/vcm/layer → layer}/tileProvider/mvtTileProvider.js +22 -5
  75. package/src/layer/tileProvider/staticGeojsonTileProvider.js +81 -0
  76. package/src/{vcs/vcm/layer → layer}/tileProvider/tileProvider.js +16 -8
  77. package/src/{vcs/vcm/layer → layer}/tileProvider/urlTemplateTileProvider.js +20 -6
  78. package/src/{vcs/vcm/layer/tms.js → layer/tmsLayer.js} +19 -20
  79. package/src/{vcs/vcm/layer → layer}/vectorHelpers.js +5 -5
  80. package/src/{vcs/vcm/layer/vector.js → layer/vectorLayer.js} +38 -48
  81. package/src/{vcs/vcm/layer → layer}/vectorProperties.js +3 -4
  82. package/src/{vcs/vcm/layer → layer}/vectorSymbols.js +0 -0
  83. package/src/{vcs/vcm/layer/vectorTile.js → layer/vectorTileLayer.js} +55 -54
  84. package/src/{vcs/vcm/layer/wfs.js → layer/wfsLayer.js} +19 -20
  85. package/src/{vcs/vcm/layer → layer}/wmsHelpers.js +1 -1
  86. package/src/{vcs/vcm/layer/wms.js → layer/wmsLayer.js} +22 -23
  87. package/src/{vcs/vcm/layer/wmts.js → layer/wmtsLayer.js} +20 -21
  88. package/src/{vcs/vcm/maps → map}/baseOLMap.js +5 -6
  89. package/src/{vcs/vcm/maps → map}/cameraLimiter.js +11 -17
  90. package/src/{vcs/vcm/maps/cesium.js → map/cesiumMap.js} +21 -34
  91. package/src/{vcs/vcm/maps → map}/mapState.js +0 -1
  92. package/src/{vcs/vcm/maps/oblique.js → map/obliqueMap.js} +42 -57
  93. package/src/{vcs/vcm/maps/openlayers.js → map/openlayersMap.js} +17 -15
  94. package/src/{vcs/vcm/maps/map.js → map/vcsMap.js} +41 -22
  95. package/src/oblique/defaultObliqueCollection.js +62 -0
  96. package/src/{vcs/vcm/oblique → oblique}/helpers.js +13 -44
  97. package/src/{vcs/vcm/oblique/ObliqueCollection.js → oblique/obliqueCollection.js} +117 -37
  98. package/src/{vcs/vcm/oblique/ObliqueDataSet.js → oblique/obliqueDataSet.js} +67 -26
  99. package/src/{vcs/vcm/oblique/ObliqueImage.js → oblique/obliqueImage.js} +1 -2
  100. package/src/{vcs/vcm/oblique/ObliqueImageMeta.js → oblique/obliqueImageMeta.js} +4 -5
  101. package/src/{vcs/vcm/oblique/ObliqueProvider.js → oblique/obliqueProvider.js} +17 -12
  102. package/src/{vcs/vcm/oblique/ObliqueView.js → oblique/obliqueView.js} +31 -2
  103. package/src/{vcs/vcm/oblique/ObliqueViewDirection.js → oblique/obliqueViewDirection.js} +0 -3
  104. package/src/{vcs/vcm/oblique → oblique}/parseImageJson.js +20 -12
  105. package/src/ol/geom/circle.js +1 -1
  106. package/src/ol/render/canvas/canvasTileRenderer.js +0 -1
  107. package/src/overrideClassRegistry.js +204 -0
  108. package/src/{vcs/vcm/util/style → style}/declarativeStyleItem.js +43 -20
  109. package/src/{vcs/vcm/util/style → style}/shapesCategory.js +0 -2
  110. package/src/style/styleFactory.js +29 -0
  111. package/src/{vcs/vcm/util/style → style}/styleHelpers.js +3 -14
  112. package/src/{vcs/vcm/util/style → style}/styleItem.js +23 -86
  113. package/src/{vcs/vcm/util/style → style}/vectorStyleItem.js +73 -85
  114. package/src/{vcs/vcm/util/style → style}/writeStyle.js +4 -7
  115. package/src/{vcs/vcm/util → util}/clipping/clippingObject.js +10 -12
  116. package/src/{vcs/vcm/util → util}/clipping/clippingObjectManager.js +2 -3
  117. package/src/{vcs/vcm/util → util}/clipping/clippingPlaneHelper.js +4 -8
  118. package/src/{vcs/vcm/util → util}/collection.js +16 -4
  119. package/src/{vcs/vcm/util → util}/dateTime.js +0 -0
  120. package/src/{vcs/vcm/util → util}/exclusiveManager.js +0 -0
  121. package/src/{vcs/vcm/util → util}/extent.js +18 -12
  122. package/src/{vcs/vcm/util → util}/featureconverter/circleToCesium.js +0 -0
  123. package/src/{vcs/vcm/util → util}/featureconverter/convert.js +0 -0
  124. package/src/util/featureconverter/extent3D.js +181 -0
  125. package/src/{vcs/vcm/util → util}/featureconverter/featureconverterHelper.js +1 -1
  126. package/src/{vcs/vcm/util → util}/featureconverter/lineStringToCesium.js +0 -0
  127. package/src/{vcs/vcm/util → util}/featureconverter/pointToCesium.js +3 -3
  128. package/src/{vcs/vcm/util → util}/featureconverter/polygonToCesium.js +1 -1
  129. package/src/util/fetch.js +32 -0
  130. package/src/{vcs/vcm/util → util}/geometryHelpers.js +0 -0
  131. package/src/{vcs/vcm/util → util}/indexedCollection.js +24 -2
  132. package/src/{vcs/vcm/util → util}/isMobile.js +0 -0
  133. package/src/{vcs/vcm/util → util}/layerCollection.js +49 -12
  134. package/src/{vcs/vcm/util → util}/locale.js +1 -1
  135. package/src/{vcs/vcm/util → util}/mapCollection.js +91 -34
  136. package/src/{vcs/vcm/util → util}/math.js +0 -0
  137. package/src/util/overrideCollection.js +223 -0
  138. package/src/{vcs/vcm/util → util}/projection.js +39 -29
  139. package/src/{vcs/vcm/util → util}/splitScreen.js +10 -10
  140. package/src/{vcs/vcm/util → util}/urlHelpers.js +0 -0
  141. package/src/{vcs/vcm/util → util}/viewpoint.js +5 -9
  142. package/src/vcsApp.js +471 -0
  143. package/src/vcsAppContextHelpers.js +121 -0
  144. package/src/{vcs/vcm/event/vcsEvent.js → vcsEvent.js} +2 -3
  145. package/src/{vcs/vcm/object.js → vcsObject.js} +2 -10
  146. package/tests/data/buildings/tileset.json +428 -0
  147. package/tests/data/dynamicPointCzml.json +64 -0
  148. package/tests/data/oblique/imageData/imagev34.json +352 -0
  149. package/tests/data/oblique/imageData/imagev35.json +54 -0
  150. package/tests/data/oblique/imageData/imagev35PerImageSize.json +53 -0
  151. package/tests/data/oblique/tiledImageData/12/2199/1342.json +1 -0
  152. package/tests/data/oblique/tiledImageData/12/2199/1343.json +1 -0
  153. package/tests/data/oblique/tiledImageData/12/2199/1344.json +1 -0
  154. package/tests/data/oblique/tiledImageData/12/2200/1342.json +1 -0
  155. package/tests/data/oblique/tiledImageData/12/2200/1343.json +1 -0
  156. package/tests/data/oblique/tiledImageData/12/2200/1344.json +1 -0
  157. package/tests/data/oblique/tiledImageData/12/2201/1342.json +1 -0
  158. package/tests/data/oblique/tiledImageData/12/2201/1343.json +1 -0
  159. package/tests/data/oblique/tiledImageData/12/2201/1344.json +1 -0
  160. package/tests/data/oblique/tiledImageData/image.json +1 -0
  161. package/tests/data/terrain/13/8800/6485.terrain +0 -0
  162. package/tests/data/terrain/13/8800/6486.terrain +0 -0
  163. package/tests/data/terrain/13/8801/6485.terrain +0 -0
  164. package/tests/data/terrain/13/8801/6486.terrain +0 -0
  165. package/tests/data/terrain/layer.json +136 -0
  166. package/tests/data/testGeoJSON.json +161 -0
  167. package/tests/data/tile.pbf +0 -0
  168. package/tests/unit/helpers/cesiumHelpers.js +272 -0
  169. package/tests/unit/helpers/getFileNameFromUrl.js +12 -0
  170. package/tests/unit/helpers/helpers.js +11 -0
  171. package/tests/unit/helpers/imageHelpers.js +20 -0
  172. package/tests/unit/helpers/importJSON.js +15 -0
  173. package/tests/unit/helpers/obliqueData.js +76 -0
  174. package/tests/unit/helpers/obliqueHelpers.js +112 -0
  175. package/tests/unit/helpers/openlayersHelpers.js +22 -0
  176. package/tests/unit/helpers/terrain/terrainData.js +46 -0
  177. package/src/vcs/vcm/classRegistry.js +0 -106
  178. package/src/vcs/vcm/globalCollections.js +0 -11
  179. package/src/vcs/vcm/layer/buildings.js +0 -17
  180. package/src/vcs/vcm/layer/cesium/pointCloudCesium.js +0 -58
  181. package/src/vcs/vcm/layer/openlayers/openStreetMapOpenlayers.js +0 -27
  182. package/src/vcs/vcm/layer/tileProvider/staticGeojsonTileProvider.js +0 -67
  183. package/src/vcs/vcm/layer/tileProvider/tileProviderFactory.js +0 -28
  184. package/src/vcs/vcm/util/featureconverter/extent3d.js +0 -154
  185. package/src/vcs/vcm/util/style/styleFactory.js +0 -48
@@ -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
 
@@ -4,38 +4,19 @@ import { EventType, ModificationKeyType, PointerKeyType } from './interactionTyp
4
4
  /**
5
5
  * @class
6
6
  * @extends {AbstractInteraction}
7
- * @export
8
7
  */
9
8
  class InteractionChain extends AbstractInteraction {
10
9
  /**
11
10
  * @param {Array<AbstractInteraction>=} chain
12
11
  */
13
12
  constructor(chain) {
14
- super();
13
+ super(EventType.ALL, ModificationKeyType.ALL, PointerKeyType.ALL);
15
14
  /**
16
15
  * The interactions to handle one after the other
17
16
  * @type {Array<AbstractInteraction>}
18
17
  * @api
19
18
  */
20
19
  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
20
  this.setActive();
40
21
  }
41
22
 
@@ -72,8 +53,8 @@ class InteractionChain extends AbstractInteraction {
72
53
  * @param {InteractionEvent} event
73
54
  * @returns {Promise<InteractionEvent>}
74
55
  */
75
- pipe(event) {
76
- let promise = Promise.resolve(event);
56
+ async pipe(event) {
57
+ let pipedEvent = event;
77
58
  const chainLength = this.chain.length;
78
59
  for (let i = 0; i < chainLength; i++) {
79
60
  const interaction = this.chain[i];
@@ -82,16 +63,14 @@ class InteractionChain extends AbstractInteraction {
82
63
  (interaction.modificationKey & event.key) &&
83
64
  (interaction.pointerKey & event.pointer)
84
65
  ) {
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));
66
+ // eslint-disable-next-line no-await-in-loop
67
+ pipedEvent = await interaction.pipe(pipedEvent);
68
+ if (pipedEvent.stopPropagation) {
69
+ break;
70
+ }
92
71
  }
93
72
  }
94
- return promise;
73
+ return pipedEvent;
95
74
  }
96
75
 
97
76
  /**
@@ -99,7 +78,7 @@ class InteractionChain extends AbstractInteraction {
99
78
  * @override
100
79
  */
101
80
  setModification() {
102
- this.modificationKey = this._defaultModificationKey;
81
+ super.setModification();
103
82
  }
104
83
 
105
84
  /**
@@ -107,7 +86,7 @@ class InteractionChain extends AbstractInteraction {
107
86
  * @override
108
87
  */
109
88
  setPointer() {
110
- this.pointerKey = this._defaultPointerKey;
89
+ super.setPointer();
111
90
  }
112
91
 
113
92
  /**
@@ -1,9 +1,8 @@
1
1
  let nextBit = 1;
2
2
 
3
3
  /**
4
- * Provides inforamtion to other interaction plugins for creating bitmasks
4
+ * Provides information to other interaction plugins for creating bitmasks
5
5
  * @class
6
- * @export
7
6
  */
8
7
  export class BitCounter {
9
8
  /**
@@ -19,7 +18,6 @@ export class BitCounter {
19
18
  /**
20
19
  * Enumeration of modification key types
21
20
  * @enum {number}
22
- * @export
23
21
  * @property {number} NONE
24
22
  * @property {number} ALT
25
23
  * @property {number} CTRL
@@ -53,7 +51,6 @@ ModificationKeyType.ALL = ModificationKeyType.NONE |
53
51
  * @property {number} DRAGEVENTS
54
52
  * @property {number} CLICKMOVE
55
53
  * @property {number} ALL
56
- * @export
57
54
  * @api
58
55
  */
59
56
  export const EventType = {
@@ -85,7 +82,6 @@ EventType.ALL = Object.values(EventType)
85
82
  * @property {number} RIGHT
86
83
  * @property {number} MIDDLE
87
84
  * @property {number} ALL
88
- * @export
89
85
  * @api
90
86
  */
91
87
  export const PointerKeyType = {
@@ -11,7 +11,6 @@ import {
11
11
  import { createEmpty } from 'ol/extent.js';
12
12
  import LayerImplementation from '../layerImplementation.js';
13
13
  import { vcsLayerName } from '../layerSymbols.js';
14
- import { getGlobalHider } from '../globalHider.js';
15
14
  import { originalStyle, updateOriginalStyle } from '../featureVisibility.js';
16
15
  import Projection from '../../util/projection.js';
17
16
  import { circleFromCenterRadius } from '../../util/geometryHelpers.js';
@@ -59,14 +58,13 @@ export function getExtentFromTileset(cesium3DTileset) {
59
58
  /**
60
59
  * represents the cesium implementation for a {@link CesiumTileset} layer.
61
60
  * @class
62
- * @export
63
61
  * @extends {LayerImplementation<import("@vcmap/core").CesiumMap>}}
64
62
  * @implements {FeatureLayerImplementation}
65
63
  * @api stable
66
64
  */
67
- class CesiumTilesetCesium extends LayerImplementation {
65
+ class CesiumTilesetCesiumImpl extends LayerImplementation {
68
66
  /** @type {string} */
69
- static get className() { return 'vcs.vcm.layer.cesium.CesiumTilesetCesium'; }
67
+ static get className() { return 'CesiumTilesetCesiumImpl'; }
70
68
 
71
69
  /**
72
70
  * @param {import("@vcmap/core").CesiumMap} map
@@ -79,12 +77,14 @@ class CesiumTilesetCesium extends LayerImplementation {
79
77
  this.cesium3DTileset = null;
80
78
  /** @type {Object} */
81
79
  this.tilesetOptions = options.tilesetOptions;
82
- /** @type {import("@vcmap/cesium").ImagerySplitDirection} */
80
+ /** @type {import("@vcmap/cesium").SplitDirection} */
83
81
  this.splitDirection = options.splitDirection;
84
82
  /** @type {import("@vcmap/core").StyleItem} */
85
83
  this.style = options.style;
86
84
  /** @type {import("@vcmap/core").FeatureVisibility} */
87
85
  this.featureVisibility = options.featureVisibility;
86
+ /** @type {import("@vcmap/core").GlobalHider} */
87
+ this.globalHider = options.globalHider;
88
88
  /** @type {Array<CesiumTilesetTilesetProperties>} */
89
89
  this.tilesetProperties = options.tilesetProperties;
90
90
  /** @type {import("@vcmap/cesium").Matrix4} */
@@ -92,7 +92,7 @@ class CesiumTilesetCesium extends LayerImplementation {
92
92
  /** @type {import("ol/coordinate").Coordinate} */
93
93
  this.offset = options.offset;
94
94
  /**
95
- * @type {Promise<void>}
95
+ * @type {Promise<import("@vcmap/cesium").Cesium3DTileset>}
96
96
  * @private
97
97
  */
98
98
  this._initializedPromise = null;
@@ -106,7 +106,6 @@ class CesiumTilesetCesium extends LayerImplementation {
106
106
  * @private
107
107
  */
108
108
  this._styleLastUpdated = Date.now();
109
- this.globalHider = getGlobalHider();
110
109
  }
111
110
 
112
111
  /**
@@ -128,9 +127,7 @@ class CesiumTilesetCesium extends LayerImplementation {
128
127
  delete tile[cesiumTilesetLastUpdated];
129
128
  });
130
129
 
131
- this._initializedPromise = new Promise((resolve, reject) => {
132
- this.cesium3DTileset.readyPromise.then(() => { resolve(); }, reject);
133
- });
130
+ this._initializedPromise = this.cesium3DTileset.readyPromise;
134
131
 
135
132
  await this._initializedPromise;
136
133
  this._originalOrigin = Cartesian3.clone(this.cesium3DTileset.boundingSphere.center);
@@ -147,7 +144,7 @@ class CesiumTilesetCesium extends LayerImplementation {
147
144
  }
148
145
  this.updateStyle(this.style);
149
146
  }
150
- return this._initializedPromise;
147
+ await this._initializedPromise;
151
148
  }
152
149
 
153
150
  /**
@@ -250,7 +247,7 @@ class CesiumTilesetCesium extends LayerImplementation {
250
247
  }
251
248
 
252
249
  /**
253
- * @param {import("@vcmap/cesium").ImagerySplitDirection} splitDirection
250
+ * @param {import("@vcmap/cesium").SplitDirection} splitDirection
254
251
  */
255
252
  updateSplitDirection(splitDirection) {
256
253
  const { splitScreen } = this.map;
@@ -356,4 +353,4 @@ class CesiumTilesetCesium extends LayerImplementation {
356
353
  }
357
354
  }
358
355
 
359
- export default CesiumTilesetCesium;
356
+ export default CesiumTilesetCesiumImpl;
@@ -25,10 +25,12 @@ function synchronizeEntityCollections(source, destination) {
25
25
 
26
26
  /**
27
27
  * @class
28
- * @export
29
28
  * @extends {LayerImplementation<import("@vcmap/core").CesiumMap>}}
30
29
  */
31
- class DataSourceCesium extends LayerImplementation {
30
+ class DataSourceCesiumImpl extends LayerImplementation {
31
+ /** @type {string} */
32
+ static get className() { return 'DataSourceCesiumImpl'; }
33
+
32
34
  /**
33
35
  * @param {import("@vcmap/core").CesiumMap} map
34
36
  * @param {DataSourceImplementationOptions} options
@@ -168,4 +170,4 @@ class DataSourceCesium extends LayerImplementation {
168
170
  }
169
171
  }
170
172
 
171
- export default DataSourceCesium;
173
+ export default DataSourceCesiumImpl;
@@ -1,14 +1,13 @@
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
- * @export
8
- * @extends {RasterLayerCesium}
7
+ * @extends {RasterLayerCesiumImpl}
9
8
  */
10
- class OpenStreetMapCesium extends RasterLayerCesium {
11
- static get className() { return 'vcs.vcm.layer.cesium.OpenStreetMapCesium'; }
9
+ class OpenStreetMapCesiumImpl extends RasterLayerCesiumImpl {
10
+ static get className() { return 'OpenStreetMapCesiumImpl'; }
12
11
 
13
12
  /**
14
13
  * @inheritDoc
@@ -26,4 +25,4 @@ class OpenStreetMapCesium extends RasterLayerCesium {
26
25
  }
27
26
 
28
27
 
29
- export default OpenStreetMapCesium;
28
+ export default OpenStreetMapCesiumImpl;
@@ -4,12 +4,11 @@ import LayerImplementation from '../layerImplementation.js';
4
4
  /**
5
5
  * RasterLayer implementation for {@link Openlayers}
6
6
  * @class
7
- * @export
8
7
  * @extends {LayerImplementation<import("@vcmap/core").CesiumMap>}}
9
8
  * @implements {RasterLayerImplementation}
10
9
  */
11
- class RasterLayerCesium extends LayerImplementation {
12
- static get className() { return 'vcs.vcm.layer.cesium.RasterLayerCesium'; }
10
+ class RasterLayerCesiumImpl extends LayerImplementation {
11
+ static get className() { return 'RasterLayerCesiumImpl'; }
13
12
 
14
13
  /**
15
14
  * @param {import("@vcmap/core").CesiumMap} map
@@ -19,7 +18,7 @@ class RasterLayerCesium extends LayerImplementation {
19
18
  super(map, options);
20
19
  /** @type {import("@vcmap/cesium").ImageryLayer|null} */
21
20
  this.cesiumLayer = null;
22
- /** @type {import("@vcmap/cesium").ImagerySplitDirection} */
21
+ /** @type {import("@vcmap/cesium").SplitDirection} */
23
22
  this.splitDirection = options.splitDirection;
24
23
  /** @type {number} */
25
24
  this.minLevel = options.minLevel;
@@ -48,7 +47,7 @@ class RasterLayerCesium extends LayerImplementation {
48
47
  }
49
48
 
50
49
  /**
51
- * @param {import("@vcmap/cesium").ImagerySplitDirection} splitDirection
50
+ * @param {import("@vcmap/cesium").SplitDirection} splitDirection
52
51
  */
53
52
  updateSplitDirection(splitDirection) {
54
53
  this.splitDirection = splitDirection;
@@ -107,4 +106,4 @@ class RasterLayerCesium extends LayerImplementation {
107
106
  }
108
107
  }
109
108
 
110
- export default RasterLayerCesium;
109
+ export default RasterLayerCesiumImpl;
@@ -1,15 +1,14 @@
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
- * @export
9
- * @extends {RasterLayerCesium}
8
+ * @extends {RasterLayerCesiumImpl}
10
9
  */
11
- class SingleImageCesium extends RasterLayerCesium {
12
- static get className() { return 'vcs.vcm.layer.cesium.singleImageLayer'; }
10
+ class SingleImageCesiumImpl extends RasterLayerCesiumImpl {
11
+ static get className() { return 'SingleImageCesiumImpl'; }
13
12
 
14
13
  /**
15
14
  * @param {import("@vcmap/core").CesiumMap} map
@@ -46,4 +45,4 @@ class SingleImageCesium extends RasterLayerCesium {
46
45
  }
47
46
  }
48
47
 
49
- export default SingleImageCesium;
48
+ export default SingleImageCesiumImpl;
@@ -4,13 +4,12 @@ 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
- * @export
10
9
  * @extends {LayerImplementation<import("@vcmap/core").CesiumMap>}}
11
10
  */
12
- class TerrainCesium extends LayerImplementation {
13
- static get className() { return 'vcs.vcm.layer.cesium.TerrainCesium'; }
11
+ class TerrainCesiumImpl extends LayerImplementation {
12
+ static get className() { return 'TerrainCesiumImpl'; }
14
13
 
15
14
  /**
16
15
  * @param {import("@vcmap/core").CesiumMap} map
@@ -77,4 +76,4 @@ class TerrainCesium extends LayerImplementation {
77
76
  }
78
77
  }
79
78
 
80
- export default TerrainCesium;
79
+ export default TerrainCesiumImpl;
@@ -1,16 +1,15 @@
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
- * @export
10
- * @extends {RasterLayerCesium}
9
+ * @extends {RasterLayerCesiumImpl}
11
10
  */
12
- class TMSCesium extends RasterLayerCesium {
13
- static get className() { return 'vcs.vcm.layer.cesium.TMSCesium'; }
11
+ class TmsCesiumImpl extends RasterLayerCesiumImpl {
12
+ static get className() { return 'TmsCesiumImpl'; }
14
13
 
15
14
  /**
16
15
  * @param {import("@vcmap/core").CesiumMap} map
@@ -51,4 +50,4 @@ class TMSCesium extends RasterLayerCesium {
51
50
  }
52
51
  }
53
52
 
54
- export default TMSCesium;
53
+ export default TmsCesiumImpl;
@@ -5,18 +5,16 @@ import convert from '../../util/featureconverter/convert.js';
5
5
  import VectorContext from './vectorContext.js';
6
6
  import { vcsLayerName } from '../layerSymbols.js';
7
7
  import LayerImplementation from '../layerImplementation.js';
8
- import { getGlobalHider } from '../globalHider.js';
9
8
  import { synchronizeFeatureVisibilityWithSource } from '../vectorHelpers.js';
10
9
 
11
10
  /**
12
11
  * represents a specific vector layer for cesium.
13
12
  * @class
14
- * @export
15
13
  * @extends {LayerImplementation<import("@vcmap/core").CesiumMap>}}
16
14
  * @implements {FeatureLayerImplementation}
17
15
  */
18
- class VectorCesium extends LayerImplementation {
19
- static get className() { return 'vcs.vcm.layer.cesium.VectorCesium'; }
16
+ class VectorCesiumImpl extends LayerImplementation {
17
+ static get className() { return 'VectorCesiumImpl'; }
20
18
 
21
19
  /**
22
20
  * @param {import("@vcmap/core").CesiumMap} map
@@ -72,7 +70,8 @@ class VectorCesium extends LayerImplementation {
72
70
  * @private
73
71
  */
74
72
  this._scene = null;
75
- this.globalHider = getGlobalHider();
73
+ /** @type {import("@vcmap/core").GlobalHider} */
74
+ this.globalHider = options.globalHider;
76
75
  }
77
76
 
78
77
  /**
@@ -116,9 +115,9 @@ class VectorCesium extends LayerImplementation {
116
115
  async initialize() {
117
116
  if (!this.initialized) {
118
117
  this._scene = this.map.getScene();
119
- await this._setupContext(this.map);
120
118
  this._addListeners();
121
119
  this._addFeatures(this.source.getFeatures());
120
+ await this._setupContext(this.map);
122
121
  }
123
122
  await super.initialize();
124
123
  }
@@ -252,4 +251,4 @@ class VectorCesium extends LayerImplementation {
252
251
  }
253
252
  }
254
253
 
255
- export default VectorCesium;
254
+ export default VectorCesiumImpl;
@@ -1,18 +1,17 @@
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
- * @export
10
- * @extends {RasterLayerCesium}
9
+ * @extends {RasterLayerCesiumImpl}
11
10
  * @implements {VectorTileImplementation}
12
11
  */
13
- class VectorRasterTileCesium extends RasterLayerCesium {
12
+ class VectorRasterTileCesiumImpl extends RasterLayerCesiumImpl {
14
13
  static get className() {
15
- return 'vcs.vcm.layer.cesium.VectorRasterTileCesium';
14
+ return 'VectorRasterTileCesiumImpl';
16
15
  }
17
16
 
18
17
  /**
@@ -113,4 +112,4 @@ class VectorRasterTileCesium extends RasterLayerCesium {
113
112
  }
114
113
  }
115
114
 
116
- export default VectorRasterTileCesium;
115
+ 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
@@ -64,7 +64,6 @@ export function getCanvasFromFeatures(features, extent, center, tileSize) {
64
64
  /**
65
65
  * implementation of Cesium ImageryProvider Interface
66
66
  * @class
67
- * @export
68
67
  */
69
68
  class VectorTileImageryProvider {
70
69
  /**
@@ -1,16 +1,15 @@
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
- * @export
10
- * @extends {RasterLayerCesium}
9
+ * @extends {RasterLayerCesiumImpl}
11
10
  */
12
- class WMSCesium extends RasterLayerCesium {
13
- static get className() { return 'vcs.vcm.layer.cesium.WMSCesium'; }
11
+ class WmsCesiumImpl extends RasterLayerCesiumImpl {
12
+ static get className() { return 'WmsCesiumImpl'; }
14
13
 
15
14
  /**
16
15
  * @param {import("@vcmap/core").CesiumMap} map
@@ -68,4 +67,4 @@ class WMSCesium extends RasterLayerCesium {
68
67
  }
69
68
  }
70
69
 
71
- export default WMSCesium;
70
+ export default WmsCesiumImpl;
@@ -1,16 +1,15 @@
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
- * @export
10
- * @extends {RasterLayerCesium}
9
+ * @extends {RasterLayerCesiumImpl}
11
10
  */
12
- class WMTSCesium extends RasterLayerCesium {
13
- static get className() { return 'vcs.vcm.layer.cesium.WMTSCesium'; }
11
+ class WmtsCesiumImpl extends RasterLayerCesiumImpl {
12
+ static get className() { return 'WmtsCesiumImpl'; }
14
13
 
15
14
  /**
16
15
  * @param {import("@vcmap/core").CesiumMap} map
@@ -98,4 +97,4 @@ class WMTSCesium extends RasterLayerCesium {
98
97
  }
99
98
  }
100
99
 
101
- export default WMTSCesium;
100
+ export default WmtsCesiumImpl;