@vcmap/core 6.2.3 → 6.3.0-rc.1

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 (288) hide show
  1. package/dist/index.d.ts +3 -1
  2. package/dist/index.js +2 -0
  3. package/dist/index.js.map +1 -1
  4. package/dist/src/category/category.d.ts +1 -1
  5. package/dist/src/category/category.js +3 -4
  6. package/dist/src/category/category.js.map +1 -1
  7. package/dist/src/featureProvider/abstractFeatureProvider.d.ts +1 -1
  8. package/dist/src/featureProvider/abstractFeatureProvider.js +3 -4
  9. package/dist/src/featureProvider/abstractFeatureProvider.js.map +1 -1
  10. package/dist/src/featureProvider/wmsFeatureProvider.d.ts +1 -1
  11. package/dist/src/featureProvider/wmsFeatureProvider.js +3 -4
  12. package/dist/src/featureProvider/wmsFeatureProvider.js.map +1 -1
  13. package/dist/src/interaction/coordinateAtPixel.js +4 -6
  14. package/dist/src/interaction/coordinateAtPixel.js.map +1 -1
  15. package/dist/src/interaction/ensurePositionInteraction.d.ts +14 -0
  16. package/dist/src/interaction/ensurePositionInteraction.js +42 -0
  17. package/dist/src/interaction/ensurePositionInteraction.js.map +1 -0
  18. package/dist/src/interaction/eventHandler.d.ts +3 -0
  19. package/dist/src/interaction/eventHandler.js +10 -1
  20. package/dist/src/interaction/eventHandler.js.map +1 -1
  21. package/dist/src/interaction/featureAtPixelInteraction.js +29 -17
  22. package/dist/src/interaction/featureAtPixelInteraction.js.map +1 -1
  23. package/dist/src/interaction/panoramaImageSelection.js +2 -2
  24. package/dist/src/interaction/panoramaImageSelection.js.map +1 -1
  25. package/dist/src/layer/cesium/cesiumTilesetCesiumImpl.d.ts +3 -3
  26. package/dist/src/layer/cesium/cesiumTilesetCesiumImpl.js.map +1 -1
  27. package/dist/src/layer/cesium/rasterLayerCesiumImpl.d.ts +3 -3
  28. package/dist/src/layer/cesium/rasterLayerCesiumImpl.js.map +1 -1
  29. package/dist/src/layer/cesium/terrainCesiumImpl.d.ts +3 -3
  30. package/dist/src/layer/cesium/terrainCesiumImpl.js.map +1 -1
  31. package/dist/src/layer/cesium/vectorContext.js +1 -1
  32. package/dist/src/layer/cesium/vectorContext.js.map +1 -1
  33. package/dist/src/layer/cesiumTilesetLayer.d.ts +1 -1
  34. package/dist/src/layer/cesiumTilesetLayer.js +7 -7
  35. package/dist/src/layer/cesiumTilesetLayer.js.map +1 -1
  36. package/dist/src/layer/cogLayer.d.ts +1 -1
  37. package/dist/src/layer/cogLayer.js +3 -4
  38. package/dist/src/layer/cogLayer.js.map +1 -1
  39. package/dist/src/layer/czmlLayer.d.ts +1 -1
  40. package/dist/src/layer/czmlLayer.js +4 -4
  41. package/dist/src/layer/czmlLayer.js.map +1 -1
  42. package/dist/src/layer/featureLayer.d.ts +1 -6
  43. package/dist/src/layer/featureLayer.js +3 -10
  44. package/dist/src/layer/featureLayer.js.map +1 -1
  45. package/dist/src/layer/featureStoreLayer.d.ts +3 -2
  46. package/dist/src/layer/featureStoreLayer.js +5 -5
  47. package/dist/src/layer/featureStoreLayer.js.map +1 -1
  48. package/dist/src/layer/flatGeobufLayer.d.ts +2 -0
  49. package/dist/src/layer/flatGeobufLayer.js +8 -0
  50. package/dist/src/layer/flatGeobufLayer.js.map +1 -1
  51. package/dist/src/layer/geojsonLayer.d.ts +1 -1
  52. package/dist/src/layer/geojsonLayer.js +5 -12
  53. package/dist/src/layer/geojsonLayer.js.map +1 -1
  54. package/dist/src/layer/layer.d.ts +21 -7
  55. package/dist/src/layer/layer.js +107 -33
  56. package/dist/src/layer/layer.js.map +1 -1
  57. package/dist/src/layer/openStreetMapLayer.d.ts +1 -1
  58. package/dist/src/layer/openStreetMapLayer.js +11 -6
  59. package/dist/src/layer/openStreetMapLayer.js.map +1 -1
  60. package/dist/src/layer/panorama/vectorPanoramaImpl.d.ts +38 -0
  61. package/dist/src/layer/panorama/vectorPanoramaImpl.js +164 -0
  62. package/dist/src/layer/panorama/vectorPanoramaImpl.js.map +1 -0
  63. package/dist/src/layer/panoramaDatasetLayer.d.ts +5 -3
  64. package/dist/src/layer/panoramaDatasetLayer.js +13 -7
  65. package/dist/src/layer/panoramaDatasetLayer.js.map +1 -1
  66. package/dist/src/layer/pointCloudLayer.d.ts +1 -5
  67. package/dist/src/layer/pointCloudLayer.js +3 -15
  68. package/dist/src/layer/pointCloudLayer.js.map +1 -1
  69. package/dist/src/layer/rasterLayer.d.ts +1 -1
  70. package/dist/src/layer/rasterLayer.js +4 -4
  71. package/dist/src/layer/rasterLayer.js.map +1 -1
  72. package/dist/src/layer/singleImageLayer.d.ts +1 -1
  73. package/dist/src/layer/singleImageLayer.js +3 -3
  74. package/dist/src/layer/singleImageLayer.js.map +1 -1
  75. package/dist/src/layer/terrainLayer.d.ts +1 -1
  76. package/dist/src/layer/terrainLayer.js +8 -6
  77. package/dist/src/layer/terrainLayer.js.map +1 -1
  78. package/dist/src/layer/tileProvider/flatGeobufTileProvider.d.ts +1 -1
  79. package/dist/src/layer/tileProvider/flatGeobufTileProvider.js +4 -3
  80. package/dist/src/layer/tileProvider/flatGeobufTileProvider.js.map +1 -1
  81. package/dist/src/layer/tileProvider/mvtTileProvider.d.ts +1 -1
  82. package/dist/src/layer/tileProvider/mvtTileProvider.js +3 -3
  83. package/dist/src/layer/tileProvider/mvtTileProvider.js.map +1 -1
  84. package/dist/src/layer/tileProvider/staticFeatureTileProvider.d.ts +1 -1
  85. package/dist/src/layer/tileProvider/staticFeatureTileProvider.js +3 -3
  86. package/dist/src/layer/tileProvider/staticFeatureTileProvider.js.map +1 -1
  87. package/dist/src/layer/tileProvider/staticGeojsonTileProvider.d.ts +1 -1
  88. package/dist/src/layer/tileProvider/staticGeojsonTileProvider.js +7 -4
  89. package/dist/src/layer/tileProvider/staticGeojsonTileProvider.js.map +1 -1
  90. package/dist/src/layer/tileProvider/tileProvider.d.ts +1 -1
  91. package/dist/src/layer/tileProvider/tileProvider.js +3 -4
  92. package/dist/src/layer/tileProvider/tileProvider.js.map +1 -1
  93. package/dist/src/layer/tileProvider/urlTemplateTileProvider.d.ts +1 -1
  94. package/dist/src/layer/tileProvider/urlTemplateTileProvider.js +3 -3
  95. package/dist/src/layer/tileProvider/urlTemplateTileProvider.js.map +1 -1
  96. package/dist/src/layer/tmsLayer.d.ts +1 -1
  97. package/dist/src/layer/tmsLayer.js +3 -10
  98. package/dist/src/layer/tmsLayer.js.map +1 -1
  99. package/dist/src/layer/vectorLayer.d.ts +11 -5
  100. package/dist/src/layer/vectorLayer.js +19 -8
  101. package/dist/src/layer/vectorLayer.js.map +1 -1
  102. package/dist/src/layer/vectorTileLayer.d.ts +1 -1
  103. package/dist/src/layer/vectorTileLayer.js +4 -5
  104. package/dist/src/layer/vectorTileLayer.js.map +1 -1
  105. package/dist/src/layer/wfsLayer.d.ts +1 -1
  106. package/dist/src/layer/wfsLayer.js +5 -4
  107. package/dist/src/layer/wfsLayer.js.map +1 -1
  108. package/dist/src/layer/wmsLayer.d.ts +1 -1
  109. package/dist/src/layer/wmsLayer.js +3 -4
  110. package/dist/src/layer/wmsLayer.js.map +1 -1
  111. package/dist/src/layer/wmtsLayer.d.ts +1 -1
  112. package/dist/src/layer/wmtsLayer.js +3 -10
  113. package/dist/src/layer/wmtsLayer.js.map +1 -1
  114. package/dist/src/map/baseCesiumMap.d.ts +69 -0
  115. package/dist/src/map/baseCesiumMap.js +381 -0
  116. package/dist/src/map/baseCesiumMap.js.map +1 -0
  117. package/dist/src/map/cesiumMap.d.ts +6 -98
  118. package/dist/src/map/cesiumMap.js +32 -258
  119. package/dist/src/map/cesiumMap.js.map +1 -1
  120. package/dist/src/map/obliqueMap.d.ts +1 -1
  121. package/dist/src/map/obliqueMap.js +3 -4
  122. package/dist/src/map/obliqueMap.js.map +1 -1
  123. package/dist/src/map/openlayersMap.d.ts +1 -1
  124. package/dist/src/map/openlayersMap.js +3 -4
  125. package/dist/src/map/openlayersMap.js.map +1 -1
  126. package/dist/src/map/panoramaMap.d.ts +17 -29
  127. package/dist/src/map/panoramaMap.js +56 -100
  128. package/dist/src/map/panoramaMap.js.map +1 -1
  129. package/dist/src/map/vcsMap.d.ts +15 -2
  130. package/dist/src/map/vcsMap.js +26 -3
  131. package/dist/src/map/vcsMap.js.map +1 -1
  132. package/dist/src/oblique/obliqueCollection.d.ts +1 -1
  133. package/dist/src/oblique/obliqueCollection.js +3 -4
  134. package/dist/src/oblique/obliqueCollection.js.map +1 -1
  135. package/dist/src/panorama/panoramaCameraController.d.ts +4 -0
  136. package/dist/src/panorama/panoramaCameraController.js +8 -0
  137. package/dist/src/panorama/panoramaCameraController.js.map +1 -1
  138. package/dist/src/panorama/panoramaImage.d.ts +10 -1
  139. package/dist/src/panorama/panoramaImage.js +9 -4
  140. package/dist/src/panorama/panoramaImage.js.map +1 -1
  141. package/dist/src/panorama/panoramaImageView.d.ts +6 -1
  142. package/dist/src/panorama/panoramaImageView.js +11 -2
  143. package/dist/src/panorama/panoramaImageView.js.map +1 -1
  144. package/dist/src/panorama/panoramaTileMaterial.d.ts +6 -0
  145. package/dist/src/panorama/panoramaTileMaterial.js +14 -0
  146. package/dist/src/panorama/panoramaTileMaterial.js.map +1 -1
  147. package/dist/src/panorama/panoramaTileMaterialFS.shader.d.ts +1 -1
  148. package/dist/src/panorama/panoramaTileMaterialFS.shader.js +16 -1
  149. package/dist/src/panorama/panoramaTileMaterialFS.shader.js.map +1 -1
  150. package/dist/src/panorama/panoramaTilePrimitiveCollection.d.ts +6 -0
  151. package/dist/src/panorama/panoramaTilePrimitiveCollection.js +28 -0
  152. package/dist/src/panorama/panoramaTilePrimitiveCollection.js.map +1 -1
  153. package/dist/src/util/clipping/clippingPolygonObject.d.ts +1 -1
  154. package/dist/src/util/clipping/clippingPolygonObject.js +3 -4
  155. package/dist/src/util/clipping/clippingPolygonObject.js.map +1 -1
  156. package/dist/src/util/displayQuality/displayQuality.js +4 -4
  157. package/dist/src/util/displayQuality/displayQuality.js.map +1 -1
  158. package/dist/src/util/editor/createFeatureSession.js +3 -1
  159. package/dist/src/util/editor/createFeatureSession.js.map +1 -1
  160. package/dist/src/util/editor/editFeaturesSession.js +9 -2
  161. package/dist/src/util/editor/editFeaturesSession.js.map +1 -1
  162. package/dist/src/util/editor/editGeometrySession.js +3 -1
  163. package/dist/src/util/editor/editGeometrySession.js.map +1 -1
  164. package/dist/src/util/editor/editorSessionHelpers.d.ts +3 -3
  165. package/dist/src/util/editor/editorSessionHelpers.js +4 -2
  166. package/dist/src/util/editor/editorSessionHelpers.js.map +1 -1
  167. package/dist/src/util/editor/interactions/creationSnapping.js +4 -1
  168. package/dist/src/util/editor/interactions/creationSnapping.js.map +1 -1
  169. package/dist/src/util/editor/interactions/ensureHandlerSelectionInteraction.js +2 -2
  170. package/dist/src/util/editor/interactions/ensureHandlerSelectionInteraction.js.map +1 -1
  171. package/dist/src/util/editor/interactions/layerSnapping.js +4 -1
  172. package/dist/src/util/editor/interactions/layerSnapping.js.map +1 -1
  173. package/dist/src/util/editor/interactions/mapInteractionController.js +12 -1
  174. package/dist/src/util/editor/interactions/mapInteractionController.js.map +1 -1
  175. package/dist/src/util/editor/interactions/translationSnapping.js +4 -2
  176. package/dist/src/util/editor/interactions/translationSnapping.js.map +1 -1
  177. package/dist/src/util/editor/selectFeaturesSession.js +1 -1
  178. package/dist/src/util/editor/selectFeaturesSession.js.map +1 -1
  179. package/dist/src/util/editor/transformation/create3DHandlers.d.ts +2 -2
  180. package/dist/src/util/editor/transformation/create3DHandlers.js.map +1 -1
  181. package/dist/src/util/editor/transformation/transformationHandler.js +5 -2
  182. package/dist/src/util/editor/transformation/transformationHandler.js.map +1 -1
  183. package/dist/src/util/editor/transformation/translateInteraction.js +2 -2
  184. package/dist/src/util/editor/transformation/translateInteraction.js.map +1 -1
  185. package/dist/src/util/flight/flightInstance.d.ts +1 -1
  186. package/dist/src/util/flight/flightInstance.js +3 -4
  187. package/dist/src/util/flight/flightInstance.js.map +1 -1
  188. package/dist/src/util/mapCollection.d.ts +5 -0
  189. package/dist/src/util/mapCollection.js +14 -0
  190. package/dist/src/util/mapCollection.js.map +1 -1
  191. package/dist/src/util/renderScreenshot.js +2 -3
  192. package/dist/src/util/renderScreenshot.js.map +1 -1
  193. package/dist/src/util/viewpoint.js +1 -1
  194. package/dist/src/util/viewpoint.js.map +1 -1
  195. package/dist/src/vcsObject.d.ts +2 -1
  196. package/dist/src/vcsObject.js +9 -1
  197. package/dist/src/vcsObject.js.map +1 -1
  198. package/dist/src/vectorCluster/vectorClusterGroup.d.ts +1 -1
  199. package/dist/src/vectorCluster/vectorClusterGroup.js +3 -4
  200. package/dist/src/vectorCluster/vectorClusterGroup.js.map +1 -1
  201. package/dist/src/vectorCluster/vectorClusterStyleItem.d.ts +1 -1
  202. package/dist/src/vectorCluster/vectorClusterStyleItem.js +3 -4
  203. package/dist/src/vectorCluster/vectorClusterStyleItem.js.map +1 -1
  204. package/dist/tests/unit/helpers/cesiumHelpers.d.ts +11 -1
  205. package/dist/tests/unit/helpers/cesiumHelpers.js +19 -2
  206. package/dist/tests/unit/helpers/cesiumHelpers.js.map +1 -1
  207. package/dist/tests/unit/helpers/panoramaHelpers.js +1 -1
  208. package/dist/tests/unit/helpers/panoramaHelpers.js.map +1 -1
  209. package/index.ts +3 -5
  210. package/package.json +2 -2
  211. package/src/category/category.ts +3 -4
  212. package/src/featureProvider/abstractFeatureProvider.ts +5 -4
  213. package/src/featureProvider/wmsFeatureProvider.ts +8 -4
  214. package/src/interaction/coordinateAtPixel.ts +4 -6
  215. package/src/interaction/ensurePositionInteraction.ts +50 -0
  216. package/src/interaction/eventHandler.ts +12 -1
  217. package/src/interaction/featureAtPixelInteraction.ts +39 -29
  218. package/src/interaction/panoramaImageSelection.ts +4 -2
  219. package/src/layer/cesium/cesiumTilesetCesiumImpl.ts +3 -3
  220. package/src/layer/cesium/rasterLayerCesiumImpl.ts +3 -3
  221. package/src/layer/cesium/terrainCesiumImpl.ts +3 -3
  222. package/src/layer/cesium/vectorContext.ts +1 -1
  223. package/src/layer/cesiumTilesetLayer.ts +9 -7
  224. package/src/layer/cogLayer.ts +5 -5
  225. package/src/layer/czmlLayer.ts +4 -4
  226. package/src/layer/featureLayer.ts +5 -16
  227. package/src/layer/featureStoreLayer.ts +11 -5
  228. package/src/layer/flatGeobufLayer.ts +12 -0
  229. package/src/layer/geojsonLayer.ts +5 -12
  230. package/src/layer/layer.ts +148 -36
  231. package/src/layer/openStreetMapLayer.ts +13 -6
  232. package/src/layer/panorama/vectorPanoramaImpl.ts +238 -0
  233. package/src/layer/panoramaDatasetLayer.ts +25 -10
  234. package/src/layer/pointCloudLayer.ts +5 -20
  235. package/src/layer/rasterLayer.ts +4 -4
  236. package/src/layer/singleImageLayer.ts +5 -3
  237. package/src/layer/terrainLayer.ts +9 -6
  238. package/src/layer/tileProvider/flatGeobufTileProvider.ts +6 -3
  239. package/src/layer/tileProvider/mvtTileProvider.ts +7 -3
  240. package/src/layer/tileProvider/staticFeatureTileProvider.ts +5 -3
  241. package/src/layer/tileProvider/staticGeojsonTileProvider.ts +11 -4
  242. package/src/layer/tileProvider/tileProvider.ts +5 -4
  243. package/src/layer/tileProvider/urlTemplateTileProvider.ts +7 -3
  244. package/src/layer/tmsLayer.ts +3 -10
  245. package/src/layer/vectorLayer.ts +25 -9
  246. package/src/layer/vectorTileLayer.ts +6 -6
  247. package/src/layer/wfsLayer.ts +7 -4
  248. package/src/layer/wmsLayer.ts +3 -4
  249. package/src/layer/wmtsLayer.ts +3 -10
  250. package/src/map/baseCesiumMap.ts +576 -0
  251. package/src/map/cesiumMap.ts +103 -446
  252. package/src/map/obliqueMap.ts +3 -4
  253. package/src/map/openlayersMap.ts +5 -5
  254. package/src/map/panoramaMap.ts +74 -139
  255. package/src/map/vcsMap.ts +44 -4
  256. package/src/oblique/obliqueCollection.ts +5 -4
  257. package/src/panorama/panoramaCameraController.ts +13 -1
  258. package/src/panorama/panoramaImage.ts +17 -3
  259. package/src/panorama/panoramaImageView.ts +29 -3
  260. package/src/panorama/panoramaTileMaterial.ts +20 -0
  261. package/src/panorama/panoramaTileMaterialFS.glsl +16 -1
  262. package/src/panorama/panoramaTilePrimitiveCollection.ts +34 -0
  263. package/src/util/clipping/clippingPolygonObject.ts +5 -4
  264. package/src/util/displayQuality/displayQuality.ts +4 -4
  265. package/src/util/editor/createFeatureSession.ts +4 -1
  266. package/src/util/editor/editFeaturesSession.ts +14 -4
  267. package/src/util/editor/editGeometrySession.ts +3 -1
  268. package/src/util/editor/editorSessionHelpers.ts +5 -3
  269. package/src/util/editor/interactions/creationSnapping.ts +7 -1
  270. package/src/util/editor/interactions/ensureHandlerSelectionInteraction.ts +2 -2
  271. package/src/util/editor/interactions/layerSnapping.ts +7 -1
  272. package/src/util/editor/interactions/mapInteractionController.ts +12 -2
  273. package/src/util/editor/interactions/translationSnapping.ts +6 -4
  274. package/src/util/editor/selectFeaturesSession.ts +1 -1
  275. package/src/util/editor/transformation/create3DHandlers.ts +2 -2
  276. package/src/util/editor/transformation/transformationHandler.ts +5 -3
  277. package/src/util/editor/transformation/translateInteraction.ts +4 -4
  278. package/src/util/flight/flightInstance.ts +6 -5
  279. package/src/util/mapCollection.ts +18 -0
  280. package/src/util/renderScreenshot.ts +4 -8
  281. package/src/util/viewpoint.ts +2 -2
  282. package/src/vcsObject.ts +10 -1
  283. package/src/vectorCluster/vectorClusterGroup.ts +7 -4
  284. package/src/vectorCluster/vectorClusterStyleItem.ts +8 -4
  285. package/dist/src/map/cesiumMapHelpers.d.ts +0 -7
  286. package/dist/src/map/cesiumMapHelpers.js +0 -144
  287. package/dist/src/map/cesiumMapHelpers.js.map +0 -1
  288. package/src/map/cesiumMapHelpers.ts +0 -219
@@ -13,8 +13,10 @@ export default class PanoramaImageSelection extends AbstractInteraction {
13
13
 
14
14
  override async pipe(event: InteractionEvent): Promise<InteractionEvent> {
15
15
  if (event.feature && (event.feature as Feature)[panoramaFeature]) {
16
- const { dataset, name } = (event.feature as Feature)[panoramaFeature]!;
17
- const panoramaImage = await dataset.createPanoramaImage(name);
16
+ const { dataset, name, time } = (event.feature as Feature)[
17
+ panoramaFeature
18
+ ]!;
19
+ const panoramaImage = await dataset.createPanoramaImage(name, time);
18
20
  event.stopPropagation = true;
19
21
 
20
22
  if (event.map instanceof PanoramaMap) {
@@ -33,11 +33,11 @@ import type {
33
33
  CesiumTilesetImplementationOptions,
34
34
  CesiumTilesetTilesetProperties,
35
35
  } from '../cesiumTilesetLayer.js';
36
- import type CesiumMap from '../../map/cesiumMap.js';
37
36
  import type { FeatureLayerImplementation } from '../featureLayer.js';
38
37
  import type StyleItem from '../../style/styleItem.js';
39
38
  import type GlobalHider from '../globalHider.js';
40
39
  import { getResourceOrUrl } from './resourceHelper.js';
40
+ import type BaseCesiumMap from '../../map/baseCesiumMap.js';
41
41
 
42
42
  export const cesiumTilesetLastUpdated: unique symbol = Symbol(
43
43
  'cesiumTilesetLastUpdated',
@@ -84,7 +84,7 @@ export function getExtentFromTileset(
84
84
  * represents the cesium implementation for a {@link CesiumTilesetLayer} layer.
85
85
  */
86
86
  class CesiumTilesetCesiumImpl
87
- extends LayerImplementation<CesiumMap>
87
+ extends LayerImplementation<BaseCesiumMap>
88
88
  implements FeatureLayerImplementation
89
89
  {
90
90
  static get className(): string {
@@ -121,7 +121,7 @@ class CesiumTilesetCesiumImpl
121
121
 
122
122
  private _customShader: CustomShader | undefined;
123
123
 
124
- constructor(map: CesiumMap, options: CesiumTilesetImplementationOptions) {
124
+ constructor(map: BaseCesiumMap, options: CesiumTilesetImplementationOptions) {
125
125
  super(map, options);
126
126
 
127
127
  this.cesium3DTileset = null;
@@ -1,16 +1,16 @@
1
1
  import type { ImageryLayer, SplitDirection } from '@vcmap-cesium/engine';
2
2
  import { vcsLayerName } from '../layerSymbols.js';
3
3
  import LayerImplementation from '../layerImplementation.js';
4
- import type CesiumMap from '../../map/cesiumMap.js';
5
4
  import type {
6
5
  RasterLayerImplementation,
7
6
  RasterLayerImplementationOptions,
8
7
  TilingScheme,
9
8
  } from '../rasterLayer.js';
10
9
  import type Extent from '../../util/extent.js';
10
+ import type BaseCesiumMap from '../../map/baseCesiumMap.js';
11
11
 
12
12
  class RasterLayerCesiumImpl
13
- extends LayerImplementation<CesiumMap>
13
+ extends LayerImplementation<BaseCesiumMap>
14
14
  implements RasterLayerImplementation
15
15
  {
16
16
  static get className(): string {
@@ -37,7 +37,7 @@ class RasterLayerCesiumImpl
37
37
 
38
38
  imageryLayerOptions: ImageryLayer.ConstructorOptions | undefined;
39
39
 
40
- constructor(map: CesiumMap, options: RasterLayerImplementationOptions) {
40
+ constructor(map: BaseCesiumMap, options: RasterLayerImplementationOptions) {
41
41
  super(map, options);
42
42
  this.splitDirection = options.splitDirection;
43
43
  this.minLevel = options.minLevel;
@@ -2,13 +2,13 @@ import type { CesiumTerrainProvider } from '@vcmap-cesium/engine';
2
2
  import LayerImplementation from '../layerImplementation.js';
3
3
  import { vcsLayerName } from '../layerSymbols.js';
4
4
  import { getTerrainProviderForUrl } from '../terrainHelpers.js';
5
- import type CesiumMap from '../../map/cesiumMap.js';
6
5
  import type { TerrainImplementationOptions } from '../terrainLayer.js';
6
+ import type BaseCesiumMap from '../../map/baseCesiumMap.js';
7
7
 
8
8
  /**
9
9
  * TerrainLayer implementation for {@link CesiumMap}
10
10
  */
11
- class TerrainCesiumImpl extends LayerImplementation<CesiumMap> {
11
+ class TerrainCesiumImpl extends LayerImplementation<BaseCesiumMap> {
12
12
  static get className(): string {
13
13
  return 'TerrainCesiumImpl';
14
14
  }
@@ -19,7 +19,7 @@ class TerrainCesiumImpl extends LayerImplementation<CesiumMap> {
19
19
 
20
20
  terrainProvider: CesiumTerrainProvider | undefined = undefined;
21
21
 
22
- constructor(map: CesiumMap, options: TerrainImplementationOptions) {
22
+ constructor(map: BaseCesiumMap, options: TerrainImplementationOptions) {
23
23
  super(map, options);
24
24
 
25
25
  this.requestVertexNormals = options.requestVertexNormals;
@@ -31,7 +31,7 @@ import {
31
31
  scaleSymbol,
32
32
  } from '../vectorSymbols.js';
33
33
  import type PanoramaMap from '../../map/panoramaMap.js';
34
- import { getResolution } from '../../map/cesiumMapHelpers.js';
34
+ import { getResolution } from '../../map/baseCesiumMap.js';
35
35
 
36
36
  export function setReferenceForPicking(
37
37
  feature: Feature,
@@ -23,6 +23,8 @@ import type { LayerOptions } from './layer.js';
23
23
  import type FeatureVisibility from './featureVisibility.js';
24
24
  import type VcsMap from '../map/vcsMap.js';
25
25
  import { cesiumColorToColor, getStringColor } from '../style/styleHelpers.js';
26
+ import PanoramaMap from '../map/panoramaMap.js';
27
+ import BaseCesiumMap from '../map/baseCesiumMap.js';
26
28
 
27
29
  export type CesiumTilesetOptions = LayerOptions & {
28
30
  /**
@@ -94,14 +96,13 @@ class CesiumTilesetLayer extends FeatureLayer<CesiumTilesetCesiumImpl> {
94
96
 
95
97
  private _offset: Coordinate | undefined;
96
98
 
97
- protected _supportedMaps = [CesiumMap.className];
99
+ protected _supportedMaps = [CesiumMap.className, PanoramaMap.className];
98
100
 
99
101
  private _customShader: CustomShader | undefined = undefined;
100
102
 
101
103
  constructor(options: CesiumTilesetOptions) {
102
- super(options);
103
- this._supportedMaps = [CesiumMap.className];
104
104
  const defaultOptions = CesiumTilesetLayer.getDefaultOptions();
105
+ super({ ...defaultOptions, ...options });
105
106
 
106
107
  this.highlightStyle = null;
107
108
  if (options.highlightStyle) {
@@ -199,7 +200,7 @@ class CesiumTilesetLayer extends FeatureLayer<CesiumTilesetCesiumImpl> {
199
200
  }
200
201
 
201
202
  createImplementationsForMap(map: VcsMap): CesiumTilesetCesiumImpl[] {
202
- if (map instanceof CesiumMap) {
203
+ if (map instanceof BaseCesiumMap) {
203
204
  return [
204
205
  new CesiumTilesetCesiumImpl(map, this.getImplementationOptions()),
205
206
  ];
@@ -244,9 +245,10 @@ class CesiumTilesetLayer extends FeatureLayer<CesiumTilesetCesiumImpl> {
244
245
  });
245
246
  }
246
247
 
247
- toJSON(): CesiumTilesetOptions {
248
- const config: CesiumTilesetOptions = super.toJSON();
249
- const defaultOptions = CesiumTilesetLayer.getDefaultOptions();
248
+ toJSON(
249
+ defaultOptions = CesiumTilesetLayer.getDefaultOptions(),
250
+ ): CesiumTilesetOptions {
251
+ const config: CesiumTilesetOptions = super.toJSON(defaultOptions);
250
252
  if (this.highlightStyle) {
251
253
  config.highlightStyle = this.highlightStyle.toJSON();
252
254
  }
@@ -88,8 +88,8 @@ class COGLayer extends RasterLayer<COGOpenlayersImpl | COGCesiumImpl> {
88
88
  private _source: GeoTIFF | undefined;
89
89
 
90
90
  constructor(options: COGLayerOptions) {
91
- super(options);
92
91
  const defaultOptions = COGLayer.getDefaultOptions();
92
+ super({ ...defaultOptions, ...options });
93
93
  this._sourceOptions = {
94
94
  convertToRGB: options.convertToRGB ?? defaultOptions.convertToRGB,
95
95
  normalize: options.normalize,
@@ -132,10 +132,10 @@ class COGLayer extends RasterLayer<COGOpenlayersImpl | COGCesiumImpl> {
132
132
  return [];
133
133
  }
134
134
 
135
- toJSON(): COGLayerOptions {
136
- const config: Partial<COGLayerOptions> & RasterLayerOptions =
137
- super.toJSON();
138
- const defaultOptions = COGLayer.getDefaultOptions();
135
+ toJSON(defaultOptions = COGLayer.getDefaultOptions()): COGLayerOptions {
136
+ const config: Partial<COGLayerOptions> & RasterLayerOptions = super.toJSON(
137
+ defaultOptions,
138
+ );
139
139
 
140
140
  delete config.tilingSchema;
141
141
  if (this._sourceOptions.convertToRGB !== defaultOptions.convertToRGB) {
@@ -49,10 +49,10 @@ class CzmlLayer extends DataSourceLayer {
49
49
  * @param options
50
50
  */
51
51
  constructor(options: CzmlOptions) {
52
- super(options);
52
+ const defaultOptions = CzmlLayer.getDefaultOptions();
53
+ super({ ...defaultOptions, ...options });
53
54
  this.entities = this.dataSource.entities;
54
55
 
55
- const defaultOptions = CzmlLayer.getDefaultOptions();
56
56
  this.sourceUri = options.sourceUri || defaultOptions.sourceUri;
57
57
  }
58
58
 
@@ -99,8 +99,8 @@ class CzmlLayer extends DataSourceLayer {
99
99
  await this.forceRedraw();
100
100
  }
101
101
 
102
- toJSON(): CzmlOptions {
103
- const config: CzmlOptions = super.toJSON();
102
+ toJSON(defaultOptions = CzmlLayer.getDefaultOptions()): CzmlOptions {
103
+ const config: CzmlOptions = super.toJSON(defaultOptions);
104
104
  if (this.sourceUri) {
105
105
  config.sourceUri = this.sourceUri;
106
106
  }
@@ -1,7 +1,6 @@
1
1
  import Style, { type StyleFunction } from 'ol/style/Style.js';
2
2
 
3
3
  import { check, oneOf } from '@vcsuite/check';
4
- import { parseInteger } from '@vcsuite/parsers';
5
4
  import { SplitDirection } from '@vcmap-cesium/engine';
6
5
  import type {
7
6
  LayerImplementationOptions,
@@ -25,7 +24,6 @@ import type { DeclarativeStyleItemOptions } from '../style/declarativeStyleItem.
25
24
 
26
25
  export type FeatureLayerOptions = LayerOptions & {
27
26
  style?: VectorStyleItemOptions | DeclarativeStyleItemOptions | StyleItem;
28
- balloonHeightOffset?: number;
29
27
  splitDirection?: string;
30
28
  featureVisibility?: FeatureVisibility;
31
29
  };
@@ -60,7 +58,6 @@ class FeatureLayer<
60
58
  return {
61
59
  ...Layer.getDefaultOptions(),
62
60
  style: undefined,
63
- balloonHeightOffset: 10,
64
61
  splitDirection: undefined,
65
62
  };
66
63
  }
@@ -74,11 +71,6 @@ class FeatureLayer<
74
71
  */
75
72
  readonly styleChanged = new VcsEvent<StyleItem>();
76
73
 
77
- /**
78
- * a height offset for rendering of a balloon for a feature of this layer.
79
- */
80
- balloonHeightOffset: number;
81
-
82
74
  private _splitDirection: SplitDirection = SplitDirection.NONE;
83
75
 
84
76
  /**
@@ -95,17 +87,12 @@ class FeatureLayer<
95
87
  * @param options
96
88
  */
97
89
  constructor(options: FeatureLayerOptions) {
98
- super(options);
99
90
  const defaultOptions = FeatureLayer.getDefaultOptions();
91
+ super({ ...defaultOptions, ...options });
100
92
 
101
93
  this._style = this.getStyleOrDefaultStyle(options.style);
102
94
  this._defaultStyle = this._style;
103
95
 
104
- this.balloonHeightOffset = parseInteger(
105
- options.balloonHeightOffset,
106
- defaultOptions.balloonHeightOffset,
107
- );
108
-
109
96
  if (options.splitDirection) {
110
97
  this._splitDirection =
111
98
  options.splitDirection === 'left'
@@ -201,8 +188,10 @@ class FeatureLayer<
201
188
  this.setStyle(this.defaultStyle);
202
189
  }
203
190
 
204
- toJSON(): FeatureLayerOptions {
205
- const config: FeatureLayerOptions = super.toJSON();
191
+ toJSON(
192
+ defaultOptions = FeatureLayer.getDefaultOptions(),
193
+ ): FeatureLayerOptions {
194
+ const config: FeatureLayerOptions = super.toJSON(defaultOptions);
206
195
  if (!this.getStyleOrDefaultStyle().equals(this._style)) {
207
196
  config.style = this.style.toJSON();
208
197
  }
@@ -46,6 +46,8 @@ import type StyleItem from '../style/styleItem.js';
46
46
  import type VcsMap from '../map/vcsMap.js';
47
47
  import type VectorCesiumImpl from './cesium/vectorCesiumImpl.js';
48
48
  import FeatureStoreFeatureVisibility from './featureStoreFeatureVisibility.js';
49
+ import BaseCesiumMap from '../map/baseCesiumMap.js';
50
+ import type VectorPanoramaImpl from './panorama/vectorPanoramaImpl.js';
49
51
 
50
52
  export type FeatureStoreStaticRepresentation = {
51
53
  /**
@@ -179,9 +181,10 @@ class FeatureStoreLayer extends VectorLayer {
179
181
  constructor(options: FeatureStoreOptions) {
180
182
  const defaultOptions = FeatureStoreLayer.getDefaultOptions();
181
183
  super({
182
- projection: defaultOptions.projection,
184
+ ...defaultOptions,
183
185
  ...options,
184
186
  });
187
+
185
188
  this._supportedMaps = [
186
189
  CesiumMap.className,
187
190
  OpenlayersMap.className,
@@ -315,10 +318,11 @@ class FeatureStoreLayer extends VectorLayer {
315
318
  | VectorOpenlayersImpl
316
319
  | VectorCesiumImpl
317
320
  | CesiumTilesetCesiumImpl
321
+ | VectorPanoramaImpl
318
322
  )[] {
319
323
  const impls = super.createImplementationsForMap(map);
320
324
  if (
321
- map instanceof CesiumMap &&
325
+ map instanceof BaseCesiumMap &&
322
326
  this.staticRepresentation &&
323
327
  this.staticRepresentation.threeDim
324
328
  ) {
@@ -588,9 +592,10 @@ class FeatureStoreLayer extends VectorLayer {
588
592
  }
589
593
  }
590
594
 
591
- toJSON(): FeatureStoreOptions {
592
- const config = super.toJSON() as Partial<FeatureStoreOptions>;
593
- const defaultOptions = FeatureStoreLayer.getDefaultOptions();
595
+ toJSON(
596
+ defaultOptions = FeatureStoreLayer.getDefaultOptions(),
597
+ ): FeatureStoreOptions {
598
+ const config = super.toJSON(defaultOptions) as Partial<FeatureStoreOptions>;
594
599
 
595
600
  delete config.projection;
596
601
  const vcsMeta = this.vectorProperties.getVcsMeta({
@@ -616,6 +621,7 @@ class FeatureStoreLayer extends VectorLayer {
616
621
  if (this.hiddenStaticFeatureIds.size > 0) {
617
622
  config.hiddenStaticFeatureIds = [...this.hiddenStaticFeatureIds];
618
623
  }
624
+
619
625
  return config as FeatureStoreOptions;
620
626
  }
621
627
 
@@ -18,11 +18,17 @@ export default class FlatGeobufLayer extends VectorLayer {
18
18
  return {
19
19
  ...super.getDefaultOptions(),
20
20
  url: '',
21
+ ignoreMapLayerTypes: false,
21
22
  };
22
23
  }
23
24
 
24
25
  private _dataFetchedPromise: Promise<void> | undefined;
25
26
 
27
+ constructor(options: FlatGeobufLayerOptions) {
28
+ const defaultOptions = FlatGeobufLayer.getDefaultOptions();
29
+ super({ ...defaultOptions, ...options });
30
+ }
31
+
26
32
  async initialize(): Promise<void> {
27
33
  if (!this.initialized) {
28
34
  await super.initialize();
@@ -63,5 +69,11 @@ export default class FlatGeobufLayer extends VectorLayer {
63
69
  }
64
70
  return this.forceRedraw();
65
71
  }
72
+
73
+ override toJSON(
74
+ defaultOptions = FlatGeobufLayer.getDefaultOptions(),
75
+ ): VectorOptions {
76
+ return super.toJSON(defaultOptions);
77
+ }
66
78
  }
67
79
  layerClassRegistry.registerClass(FlatGeobufLayer.className, FlatGeobufLayer);
@@ -3,7 +3,7 @@ import type { FeatureCollection } from 'geojson';
3
3
  import type { VectorOptions } from './vectorLayer.js';
4
4
  import VectorLayer from './vectorLayer.js';
5
5
  import { parseGeoJSON, writeGeoJSONFeature } from './geojsonHelpers.js';
6
- import Projection, { wgs84Projection } from '../util/projection.js';
6
+ import { wgs84Projection } from '../util/projection.js';
7
7
  import { layerClassRegistry } from '../classRegistry.js';
8
8
  import { getInitForUrl, requestJson } from '../util/fetch.js';
9
9
 
@@ -29,6 +29,7 @@ class GeoJSONLayer extends VectorLayer {
29
29
  ...VectorLayer.getDefaultOptions(),
30
30
  projection: wgs84Projection.toJSON(),
31
31
  features: undefined,
32
+ ignoreMapLayerTypes: false,
32
33
  };
33
34
  }
34
35
 
@@ -39,7 +40,7 @@ class GeoJSONLayer extends VectorLayer {
39
40
  constructor(options: GeoJSONOptions) {
40
41
  const defaultOptions = GeoJSONLayer.getDefaultOptions();
41
42
  super({
42
- projection: defaultOptions.projection,
43
+ ...defaultOptions,
43
44
  ...options,
44
45
  });
45
46
  this._featuresToLoad = options.features || defaultOptions.features;
@@ -120,16 +121,8 @@ class GeoJSONLayer extends VectorLayer {
120
121
  }
121
122
  }
122
123
 
123
- toJSON(): GeoJSONOptions {
124
- const config: GeoJSONOptions = super.toJSON();
125
- const defaultOptions = GeoJSONLayer.getDefaultOptions();
126
-
127
- const defaultProjection = new Projection(defaultOptions.projection);
128
- if (!this.projection.equals(defaultProjection)) {
129
- config.projection = this.projection.toJSON();
130
- } else {
131
- delete config.projection;
132
- }
124
+ toJSON(defaultOptions = GeoJSONLayer.getDefaultOptions()): GeoJSONOptions {
125
+ const config: GeoJSONOptions = super.toJSON(defaultOptions);
133
126
 
134
127
  if (Array.isArray(this._featuresToLoad)) {
135
128
  config.features = this._featuresToLoad.slice();