@vcmap/core 6.2.4 → 6.3.0-rc.2

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 (378) hide show
  1. package/dist/cesium.d.ts +12 -0
  2. package/dist/index.d.ts +13 -3
  3. package/dist/index.js +11 -2
  4. package/dist/index.js.map +1 -1
  5. package/dist/ol.d.ts +13 -2
  6. package/dist/src/category/category.d.ts +1 -1
  7. package/dist/src/category/category.js +3 -4
  8. package/dist/src/category/category.js.map +1 -1
  9. package/dist/src/cesium/cesium3DTileFeature.d.ts +1 -0
  10. package/dist/src/cesium/cesium3DTileFeature.js +14 -3
  11. package/dist/src/cesium/cesium3DTileFeature.js.map +1 -1
  12. package/dist/src/cesium/cesium3DTilePointFeature.js +2 -1
  13. package/dist/src/cesium/cesium3DTilePointFeature.js.map +1 -1
  14. package/dist/src/classRegistry.d.ts +7 -1
  15. package/dist/src/classRegistry.js.map +1 -1
  16. package/dist/src/featureProvider/abstractAttributeProvider.d.ts +62 -0
  17. package/dist/src/featureProvider/abstractAttributeProvider.js +129 -0
  18. package/dist/src/featureProvider/abstractAttributeProvider.js.map +1 -0
  19. package/dist/src/featureProvider/abstractFeatureProvider.d.ts +10 -19
  20. package/dist/src/featureProvider/abstractFeatureProvider.js +10 -42
  21. package/dist/src/featureProvider/abstractFeatureProvider.js.map +1 -1
  22. package/dist/src/featureProvider/compositeFeatureProvider.d.ts +27 -0
  23. package/dist/src/featureProvider/compositeFeatureProvider.js +53 -0
  24. package/dist/src/featureProvider/compositeFeatureProvider.js.map +1 -0
  25. package/dist/src/featureProvider/csvAttributeProvider.d.ts +41 -0
  26. package/dist/src/featureProvider/csvAttributeProvider.js +126 -0
  27. package/dist/src/featureProvider/csvAttributeProvider.js.map +1 -0
  28. package/dist/src/featureProvider/featureProviderFactory.d.ts +3 -0
  29. package/dist/src/featureProvider/featureProviderFactory.js +17 -0
  30. package/dist/src/featureProvider/featureProviderFactory.js.map +1 -0
  31. package/dist/src/featureProvider/i3sAttributeProvider.d.ts +7 -0
  32. package/dist/src/featureProvider/i3sAttributeProvider.js +43 -0
  33. package/dist/src/featureProvider/i3sAttributeProvider.js.map +1 -0
  34. package/dist/src/featureProvider/jsonAttributeProvider.d.ts +26 -0
  35. package/dist/src/featureProvider/jsonAttributeProvider.js +73 -0
  36. package/dist/src/featureProvider/jsonAttributeProvider.js.map +1 -0
  37. package/dist/src/featureProvider/tileProviderFeatureProvider.d.ts +4 -6
  38. package/dist/src/featureProvider/tileProviderFeatureProvider.js +9 -11
  39. package/dist/src/featureProvider/tileProviderFeatureProvider.js.map +1 -1
  40. package/dist/src/featureProvider/urlIdAttributeProvider.d.ts +28 -0
  41. package/dist/src/featureProvider/urlIdAttributeProvider.js +50 -0
  42. package/dist/src/featureProvider/urlIdAttributeProvider.js.map +1 -0
  43. package/dist/src/featureProvider/wmsFeatureProvider.d.ts +13 -4
  44. package/dist/src/featureProvider/wmsFeatureProvider.js +19 -9
  45. package/dist/src/featureProvider/wmsFeatureProvider.js.map +1 -1
  46. package/dist/src/interaction/coordinateAtPixel.js +4 -6
  47. package/dist/src/interaction/coordinateAtPixel.js.map +1 -1
  48. package/dist/src/interaction/ensurePositionInteraction.d.ts +14 -0
  49. package/dist/src/interaction/ensurePositionInteraction.js +42 -0
  50. package/dist/src/interaction/ensurePositionInteraction.js.map +1 -0
  51. package/dist/src/interaction/eventHandler.d.ts +3 -0
  52. package/dist/src/interaction/eventHandler.js +10 -1
  53. package/dist/src/interaction/eventHandler.js.map +1 -1
  54. package/dist/src/interaction/featureAtPixelInteraction.d.ts +15 -3
  55. package/dist/src/interaction/featureAtPixelInteraction.js +70 -18
  56. package/dist/src/interaction/featureAtPixelInteraction.js.map +1 -1
  57. package/dist/src/interaction/featureProviderInteraction.js +42 -26
  58. package/dist/src/interaction/featureProviderInteraction.js.map +1 -1
  59. package/dist/src/interaction/panoramaImageSelection.js +2 -2
  60. package/dist/src/interaction/panoramaImageSelection.js.map +1 -1
  61. package/dist/src/layer/cesium/cesiumTilesetCesiumImpl.d.ts +17 -9
  62. package/dist/src/layer/cesium/cesiumTilesetCesiumImpl.js +244 -165
  63. package/dist/src/layer/cesium/cesiumTilesetCesiumImpl.js.map +1 -1
  64. package/dist/src/layer/cesium/i3sCesiumImpl.d.ts +33 -0
  65. package/dist/src/layer/cesium/i3sCesiumImpl.js +107 -0
  66. package/dist/src/layer/cesium/i3sCesiumImpl.js.map +1 -0
  67. package/dist/src/layer/cesium/rasterLayerCesiumImpl.d.ts +3 -3
  68. package/dist/src/layer/cesium/rasterLayerCesiumImpl.js.map +1 -1
  69. package/dist/src/layer/cesium/terrainCesiumImpl.d.ts +3 -3
  70. package/dist/src/layer/cesium/terrainCesiumImpl.js.map +1 -1
  71. package/dist/src/layer/cesium/vcsTile/vcsQuadtreeTileProvider.js +2 -1
  72. package/dist/src/layer/cesium/vcsTile/vcsQuadtreeTileProvider.js.map +1 -1
  73. package/dist/src/layer/cesium/vectorContext.js +1 -1
  74. package/dist/src/layer/cesium/vectorContext.js.map +1 -1
  75. package/dist/src/layer/cesium/vectorRasterTileCesiumImpl.js +7 -6
  76. package/dist/src/layer/cesium/vectorRasterTileCesiumImpl.js.map +1 -1
  77. package/dist/src/layer/cesium/vectorTileImageryProvider.js +2 -2
  78. package/dist/src/layer/cesium/vectorTileImageryProvider.js.map +1 -1
  79. package/dist/src/layer/cesiumTilesetLayer.d.ts +10 -1
  80. package/dist/src/layer/cesiumTilesetLayer.js +33 -8
  81. package/dist/src/layer/cesiumTilesetLayer.js.map +1 -1
  82. package/dist/src/layer/cogLayer.d.ts +1 -1
  83. package/dist/src/layer/cogLayer.js +3 -4
  84. package/dist/src/layer/cogLayer.js.map +1 -1
  85. package/dist/src/layer/czmlLayer.d.ts +1 -1
  86. package/dist/src/layer/czmlLayer.js +4 -4
  87. package/dist/src/layer/czmlLayer.js.map +1 -1
  88. package/dist/src/layer/featureLayer.d.ts +1 -6
  89. package/dist/src/layer/featureLayer.js +3 -10
  90. package/dist/src/layer/featureLayer.js.map +1 -1
  91. package/dist/src/layer/featureStoreLayer.d.ts +3 -2
  92. package/dist/src/layer/featureStoreLayer.js +5 -5
  93. package/dist/src/layer/featureStoreLayer.js.map +1 -1
  94. package/dist/src/layer/flatGeobufLayer.d.ts +2 -0
  95. package/dist/src/layer/flatGeobufLayer.js +8 -0
  96. package/dist/src/layer/flatGeobufLayer.js.map +1 -1
  97. package/dist/src/layer/geojsonLayer.d.ts +1 -1
  98. package/dist/src/layer/geojsonLayer.js +5 -12
  99. package/dist/src/layer/geojsonLayer.js.map +1 -1
  100. package/dist/src/layer/i3sLayer.d.ts +80 -0
  101. package/dist/src/layer/i3sLayer.js +242 -0
  102. package/dist/src/layer/i3sLayer.js.map +1 -0
  103. package/dist/src/layer/layer.d.ts +29 -10
  104. package/dist/src/layer/layer.js +114 -34
  105. package/dist/src/layer/layer.js.map +1 -1
  106. package/dist/src/layer/layerSymbols.d.ts +4 -0
  107. package/dist/src/layer/layerSymbols.js +4 -0
  108. package/dist/src/layer/layerSymbols.js.map +1 -1
  109. package/dist/src/layer/openStreetMapLayer.d.ts +1 -1
  110. package/dist/src/layer/openStreetMapLayer.js +11 -6
  111. package/dist/src/layer/openStreetMapLayer.js.map +1 -1
  112. package/dist/src/layer/panorama/vectorPanoramaImpl.d.ts +38 -0
  113. package/dist/src/layer/panorama/vectorPanoramaImpl.js +164 -0
  114. package/dist/src/layer/panorama/vectorPanoramaImpl.js.map +1 -0
  115. package/dist/src/layer/panoramaDatasetLayer.d.ts +7 -3
  116. package/dist/src/layer/panoramaDatasetLayer.js +46 -20
  117. package/dist/src/layer/panoramaDatasetLayer.js.map +1 -1
  118. package/dist/src/layer/pointCloudLayer.d.ts +1 -5
  119. package/dist/src/layer/pointCloudLayer.js +3 -15
  120. package/dist/src/layer/pointCloudLayer.js.map +1 -1
  121. package/dist/src/layer/rasterLayer.d.ts +1 -1
  122. package/dist/src/layer/rasterLayer.js +4 -4
  123. package/dist/src/layer/rasterLayer.js.map +1 -1
  124. package/dist/src/layer/singleImageLayer.d.ts +1 -1
  125. package/dist/src/layer/singleImageLayer.js +3 -3
  126. package/dist/src/layer/singleImageLayer.js.map +1 -1
  127. package/dist/src/layer/terrainLayer.d.ts +1 -1
  128. package/dist/src/layer/terrainLayer.js +8 -6
  129. package/dist/src/layer/terrainLayer.js.map +1 -1
  130. package/dist/src/layer/tileProvider/flatGeobufTileProvider.d.ts +1 -1
  131. package/dist/src/layer/tileProvider/flatGeobufTileProvider.js +7 -5
  132. package/dist/src/layer/tileProvider/flatGeobufTileProvider.js.map +1 -1
  133. package/dist/src/layer/tileProvider/mvtTileProvider.d.ts +1 -1
  134. package/dist/src/layer/tileProvider/mvtTileProvider.js +6 -5
  135. package/dist/src/layer/tileProvider/mvtTileProvider.js.map +1 -1
  136. package/dist/src/layer/tileProvider/staticFeatureTileProvider.d.ts +1 -1
  137. package/dist/src/layer/tileProvider/staticFeatureTileProvider.js +3 -3
  138. package/dist/src/layer/tileProvider/staticFeatureTileProvider.js.map +1 -1
  139. package/dist/src/layer/tileProvider/staticGeojsonTileProvider.d.ts +1 -1
  140. package/dist/src/layer/tileProvider/staticGeojsonTileProvider.js +7 -4
  141. package/dist/src/layer/tileProvider/staticGeojsonTileProvider.js.map +1 -1
  142. package/dist/src/layer/tileProvider/tileProvider.d.ts +7 -1
  143. package/dist/src/layer/tileProvider/tileProvider.js +15 -5
  144. package/dist/src/layer/tileProvider/tileProvider.js.map +1 -1
  145. package/dist/src/layer/tileProvider/urlTemplateTileProvider.d.ts +1 -1
  146. package/dist/src/layer/tileProvider/urlTemplateTileProvider.js +3 -3
  147. package/dist/src/layer/tileProvider/urlTemplateTileProvider.js.map +1 -1
  148. package/dist/src/layer/tmsLayer.d.ts +1 -1
  149. package/dist/src/layer/tmsLayer.js +3 -10
  150. package/dist/src/layer/tmsLayer.js.map +1 -1
  151. package/dist/src/layer/vectorLayer.d.ts +11 -5
  152. package/dist/src/layer/vectorLayer.js +21 -10
  153. package/dist/src/layer/vectorLayer.js.map +1 -1
  154. package/dist/src/layer/vectorProperties.js +10 -1
  155. package/dist/src/layer/vectorProperties.js.map +1 -1
  156. package/dist/src/layer/vectorTileLayer.d.ts +14 -5
  157. package/dist/src/layer/vectorTileLayer.js +82 -31
  158. package/dist/src/layer/vectorTileLayer.js.map +1 -1
  159. package/dist/src/layer/wfsLayer.d.ts +1 -1
  160. package/dist/src/layer/wfsLayer.js +5 -4
  161. package/dist/src/layer/wfsLayer.js.map +1 -1
  162. package/dist/src/layer/wmsLayer.d.ts +4 -1
  163. package/dist/src/layer/wmsLayer.js +65 -36
  164. package/dist/src/layer/wmsLayer.js.map +1 -1
  165. package/dist/src/layer/wmtsLayer.d.ts +1 -1
  166. package/dist/src/layer/wmtsLayer.js +3 -10
  167. package/dist/src/layer/wmtsLayer.js.map +1 -1
  168. package/dist/src/map/baseCesiumMap.d.ts +69 -0
  169. package/dist/src/map/baseCesiumMap.js +393 -0
  170. package/dist/src/map/baseCesiumMap.js.map +1 -0
  171. package/dist/src/map/cesiumMap.d.ts +6 -98
  172. package/dist/src/map/cesiumMap.js +29 -266
  173. package/dist/src/map/cesiumMap.js.map +1 -1
  174. package/dist/src/map/obliqueMap.d.ts +1 -1
  175. package/dist/src/map/obliqueMap.js +14 -8
  176. package/dist/src/map/obliqueMap.js.map +1 -1
  177. package/dist/src/map/openlayersMap.d.ts +1 -1
  178. package/dist/src/map/openlayersMap.js +3 -4
  179. package/dist/src/map/openlayersMap.js.map +1 -1
  180. package/dist/src/map/panoramaMap.d.ts +17 -29
  181. package/dist/src/map/panoramaMap.js +56 -100
  182. package/dist/src/map/panoramaMap.js.map +1 -1
  183. package/dist/src/map/vcsMap.d.ts +15 -2
  184. package/dist/src/map/vcsMap.js +26 -3
  185. package/dist/src/map/vcsMap.js.map +1 -1
  186. package/dist/src/oblique/obliqueCollection.d.ts +1 -1
  187. package/dist/src/oblique/obliqueCollection.js +3 -4
  188. package/dist/src/oblique/obliqueCollection.js.map +1 -1
  189. package/dist/src/panorama/panoramaCameraController.d.ts +4 -0
  190. package/dist/src/panorama/panoramaCameraController.js +8 -0
  191. package/dist/src/panorama/panoramaCameraController.js.map +1 -1
  192. package/dist/src/panorama/panoramaImage.d.ts +10 -1
  193. package/dist/src/panorama/panoramaImage.js +15 -9
  194. package/dist/src/panorama/panoramaImage.js.map +1 -1
  195. package/dist/src/panorama/panoramaImageView.d.ts +6 -1
  196. package/dist/src/panorama/panoramaImageView.js +11 -2
  197. package/dist/src/panorama/panoramaImageView.js.map +1 -1
  198. package/dist/src/panorama/panoramaTileMaterial.d.ts +6 -0
  199. package/dist/src/panorama/panoramaTileMaterial.js +14 -0
  200. package/dist/src/panorama/panoramaTileMaterial.js.map +1 -1
  201. package/dist/src/panorama/panoramaTileMaterialFS.shader.d.ts +1 -1
  202. package/dist/src/panorama/panoramaTileMaterialFS.shader.js +16 -1
  203. package/dist/src/panorama/panoramaTileMaterialFS.shader.js.map +1 -1
  204. package/dist/src/panorama/panoramaTilePrimitiveCollection.d.ts +6 -0
  205. package/dist/src/panorama/panoramaTilePrimitiveCollection.js +28 -0
  206. package/dist/src/panorama/panoramaTilePrimitiveCollection.js.map +1 -1
  207. package/dist/src/style/declarativeStyleItem.js +7 -8
  208. package/dist/src/style/declarativeStyleItem.js.map +1 -1
  209. package/dist/src/util/clipping/clippingPolygonObject.d.ts +1 -1
  210. package/dist/src/util/clipping/clippingPolygonObject.js +3 -4
  211. package/dist/src/util/clipping/clippingPolygonObject.js.map +1 -1
  212. package/dist/src/util/displayQuality/displayQuality.js +4 -4
  213. package/dist/src/util/displayQuality/displayQuality.js.map +1 -1
  214. package/dist/src/util/editor/createFeatureSession.js +3 -1
  215. package/dist/src/util/editor/createFeatureSession.js.map +1 -1
  216. package/dist/src/util/editor/editFeaturesSession.js +9 -2
  217. package/dist/src/util/editor/editFeaturesSession.js.map +1 -1
  218. package/dist/src/util/editor/editGeometrySession.js +3 -1
  219. package/dist/src/util/editor/editGeometrySession.js.map +1 -1
  220. package/dist/src/util/editor/editorSessionHelpers.d.ts +3 -3
  221. package/dist/src/util/editor/editorSessionHelpers.js +4 -2
  222. package/dist/src/util/editor/editorSessionHelpers.js.map +1 -1
  223. package/dist/src/util/editor/interactions/creationSnapping.js +4 -1
  224. package/dist/src/util/editor/interactions/creationSnapping.js.map +1 -1
  225. package/dist/src/util/editor/interactions/ensureHandlerSelectionInteraction.js +2 -2
  226. package/dist/src/util/editor/interactions/ensureHandlerSelectionInteraction.js.map +1 -1
  227. package/dist/src/util/editor/interactions/layerSnapping.js +4 -1
  228. package/dist/src/util/editor/interactions/layerSnapping.js.map +1 -1
  229. package/dist/src/util/editor/interactions/mapInteractionController.js +12 -1
  230. package/dist/src/util/editor/interactions/mapInteractionController.js.map +1 -1
  231. package/dist/src/util/editor/interactions/translationSnapping.js +4 -2
  232. package/dist/src/util/editor/interactions/translationSnapping.js.map +1 -1
  233. package/dist/src/util/editor/selectFeaturesSession.js +1 -1
  234. package/dist/src/util/editor/selectFeaturesSession.js.map +1 -1
  235. package/dist/src/util/editor/transformation/create3DHandlers.d.ts +2 -2
  236. package/dist/src/util/editor/transformation/create3DHandlers.js.map +1 -1
  237. package/dist/src/util/editor/transformation/transformationHandler.js +5 -2
  238. package/dist/src/util/editor/transformation/transformationHandler.js.map +1 -1
  239. package/dist/src/util/editor/transformation/translateInteraction.js +2 -2
  240. package/dist/src/util/editor/transformation/translateInteraction.js.map +1 -1
  241. package/dist/src/util/fetch.d.ts +7 -0
  242. package/dist/src/util/fetch.js +7 -0
  243. package/dist/src/util/fetch.js.map +1 -1
  244. package/dist/src/util/flight/flightInstance.d.ts +1 -1
  245. package/dist/src/util/flight/flightInstance.js +3 -4
  246. package/dist/src/util/flight/flightInstance.js.map +1 -1
  247. package/dist/src/util/mapCollection.d.ts +5 -0
  248. package/dist/src/util/mapCollection.js +14 -0
  249. package/dist/src/util/mapCollection.js.map +1 -1
  250. package/dist/src/util/renderScreenshot.js +2 -3
  251. package/dist/src/util/renderScreenshot.js.map +1 -1
  252. package/dist/src/util/viewpoint.js +1 -1
  253. package/dist/src/util/viewpoint.js.map +1 -1
  254. package/dist/src/vcsApp.d.ts +2 -3
  255. package/dist/src/vcsApp.js.map +1 -1
  256. package/dist/src/vcsModuleHelpers.d.ts +5 -2
  257. package/dist/src/vcsModuleHelpers.js +27 -1
  258. package/dist/src/vcsModuleHelpers.js.map +1 -1
  259. package/dist/src/vcsObject.d.ts +2 -1
  260. package/dist/src/vcsObject.js +9 -1
  261. package/dist/src/vcsObject.js.map +1 -1
  262. package/dist/src/vectorCluster/vectorClusterGroup.d.ts +1 -1
  263. package/dist/src/vectorCluster/vectorClusterGroup.js +3 -4
  264. package/dist/src/vectorCluster/vectorClusterGroup.js.map +1 -1
  265. package/dist/src/vectorCluster/vectorClusterStyleItem.d.ts +1 -1
  266. package/dist/src/vectorCluster/vectorClusterStyleItem.js +3 -4
  267. package/dist/src/vectorCluster/vectorClusterStyleItem.js.map +1 -1
  268. package/dist/tests/unit/helpers/cesiumHelpers.d.ts +11 -1
  269. package/dist/tests/unit/helpers/cesiumHelpers.js +26 -3
  270. package/dist/tests/unit/helpers/cesiumHelpers.js.map +1 -1
  271. package/dist/tests/unit/helpers/panoramaHelpers.js +1 -1
  272. package/dist/tests/unit/helpers/panoramaHelpers.js.map +1 -1
  273. package/index.ts +30 -5
  274. package/package.json +3 -3
  275. package/src/category/category.ts +3 -4
  276. package/src/cesium/cesium.d.ts +12 -0
  277. package/src/cesium/cesium3DTileFeature.ts +23 -3
  278. package/src/cesium/cesium3DTilePointFeature.ts +3 -1
  279. package/src/classRegistry.ts +8 -3
  280. package/src/featureProvider/abstractAttributeProvider.ts +201 -0
  281. package/src/featureProvider/abstractFeatureProvider.ts +32 -51
  282. package/src/featureProvider/compositeFeatureProvider.ts +103 -0
  283. package/src/featureProvider/csvAttributeProvider.ts +186 -0
  284. package/src/featureProvider/featureProviderFactory.ts +31 -0
  285. package/src/featureProvider/i3sAttributeProvider.ts +60 -0
  286. package/src/featureProvider/jsonAttributeProvider.ts +109 -0
  287. package/src/featureProvider/tileProviderFeatureProvider.ts +13 -14
  288. package/src/featureProvider/urlIdAttributeProvider.ts +82 -0
  289. package/src/featureProvider/wmsFeatureProvider.ts +31 -10
  290. package/src/global.d.ts +2 -0
  291. package/src/interaction/coordinateAtPixel.ts +4 -6
  292. package/src/interaction/ensurePositionInteraction.ts +50 -0
  293. package/src/interaction/eventHandler.ts +12 -1
  294. package/src/interaction/featureAtPixelInteraction.ts +92 -32
  295. package/src/interaction/featureProviderInteraction.ts +59 -38
  296. package/src/interaction/panoramaImageSelection.ts +4 -2
  297. package/src/layer/cesium/cesiumTilesetCesiumImpl.ts +297 -197
  298. package/src/layer/cesium/i3sCesiumImpl.ts +141 -0
  299. package/src/layer/cesium/rasterLayerCesiumImpl.ts +3 -3
  300. package/src/layer/cesium/terrainCesiumImpl.ts +3 -3
  301. package/src/layer/cesium/vcsTile/vcsQuadtreeTileProvider.ts +4 -3
  302. package/src/layer/cesium/vectorContext.ts +1 -1
  303. package/src/layer/cesium/vectorRasterTileCesiumImpl.ts +7 -6
  304. package/src/layer/cesium/vectorTileImageryProvider.ts +2 -2
  305. package/src/layer/cesiumTilesetLayer.ts +60 -8
  306. package/src/layer/cogLayer.ts +5 -5
  307. package/src/layer/czmlLayer.ts +4 -4
  308. package/src/layer/featureLayer.ts +5 -16
  309. package/src/layer/featureStoreLayer.ts +11 -5
  310. package/src/layer/flatGeobufLayer.ts +12 -0
  311. package/src/layer/geojsonLayer.ts +5 -12
  312. package/src/layer/i3sLayer.ts +343 -0
  313. package/src/layer/layer.ts +178 -39
  314. package/src/layer/layerSymbols.ts +5 -0
  315. package/src/layer/openStreetMapLayer.ts +13 -6
  316. package/src/layer/panorama/vectorPanoramaImpl.ts +238 -0
  317. package/src/layer/panoramaDatasetLayer.ts +69 -23
  318. package/src/layer/pointCloudLayer.ts +5 -20
  319. package/src/layer/rasterLayer.ts +4 -4
  320. package/src/layer/singleImageLayer.ts +5 -3
  321. package/src/layer/terrainLayer.ts +9 -6
  322. package/src/layer/tileProvider/flatGeobufTileProvider.ts +9 -5
  323. package/src/layer/tileProvider/mvtTileProvider.ts +10 -5
  324. package/src/layer/tileProvider/staticFeatureTileProvider.ts +5 -3
  325. package/src/layer/tileProvider/staticGeojsonTileProvider.ts +11 -4
  326. package/src/layer/tileProvider/tileProvider.ts +18 -5
  327. package/src/layer/tileProvider/urlTemplateTileProvider.ts +7 -3
  328. package/src/layer/tmsLayer.ts +3 -10
  329. package/src/layer/vectorLayer.ts +29 -11
  330. package/src/layer/vectorProperties.ts +10 -1
  331. package/src/layer/vectorTileLayer.ts +141 -53
  332. package/src/layer/wfsLayer.ts +7 -4
  333. package/src/layer/wmsLayer.ts +80 -48
  334. package/src/layer/wmtsLayer.ts +3 -10
  335. package/src/map/baseCesiumMap.ts +600 -0
  336. package/src/map/cesiumMap.ts +99 -457
  337. package/src/map/obliqueMap.ts +16 -10
  338. package/src/map/openlayersMap.ts +5 -5
  339. package/src/map/panoramaMap.ts +74 -139
  340. package/src/map/vcsMap.ts +44 -4
  341. package/src/oblique/obliqueCollection.ts +5 -4
  342. package/src/ol/ol.d.ts +13 -2
  343. package/src/panorama/panoramaCameraController.ts +13 -1
  344. package/src/panorama/panoramaImage.ts +25 -8
  345. package/src/panorama/panoramaImageView.ts +29 -3
  346. package/src/panorama/panoramaTileMaterial.ts +20 -0
  347. package/src/panorama/panoramaTileMaterialFS.glsl +16 -1
  348. package/src/panorama/panoramaTilePrimitiveCollection.ts +34 -0
  349. package/src/style/declarativeStyleItem.ts +7 -9
  350. package/src/util/clipping/clippingPolygonObject.ts +5 -4
  351. package/src/util/displayQuality/displayQuality.ts +4 -4
  352. package/src/util/editor/createFeatureSession.ts +4 -1
  353. package/src/util/editor/editFeaturesSession.ts +14 -4
  354. package/src/util/editor/editGeometrySession.ts +3 -1
  355. package/src/util/editor/editorSessionHelpers.ts +5 -3
  356. package/src/util/editor/interactions/creationSnapping.ts +7 -1
  357. package/src/util/editor/interactions/ensureHandlerSelectionInteraction.ts +2 -2
  358. package/src/util/editor/interactions/layerSnapping.ts +7 -1
  359. package/src/util/editor/interactions/mapInteractionController.ts +12 -2
  360. package/src/util/editor/interactions/translationSnapping.ts +6 -4
  361. package/src/util/editor/selectFeaturesSession.ts +1 -1
  362. package/src/util/editor/transformation/create3DHandlers.ts +2 -2
  363. package/src/util/editor/transformation/transformationHandler.ts +5 -3
  364. package/src/util/editor/transformation/translateInteraction.ts +4 -4
  365. package/src/util/fetch.ts +7 -0
  366. package/src/util/flight/flightInstance.ts +6 -5
  367. package/src/util/mapCollection.ts +18 -0
  368. package/src/util/renderScreenshot.ts +4 -8
  369. package/src/util/viewpoint.ts +2 -2
  370. package/src/vcsApp.ts +7 -8
  371. package/src/vcsModuleHelpers.ts +62 -4
  372. package/src/vcsObject.ts +10 -1
  373. package/src/vectorCluster/vectorClusterGroup.ts +7 -4
  374. package/src/vectorCluster/vectorClusterStyleItem.ts +8 -4
  375. package/dist/src/map/cesiumMapHelpers.d.ts +0 -7
  376. package/dist/src/map/cesiumMapHelpers.js +0 -144
  377. package/dist/src/map/cesiumMapHelpers.js.map +0 -1
  378. package/src/map/cesiumMapHelpers.ts +0 -219
@@ -0,0 +1,141 @@
1
+ import type {
2
+ Cesium3DTile,
3
+ Cesium3DTileContent,
4
+ SplitDirection,
5
+ } from '@vcmap-cesium/engine';
6
+ import { I3SDataProvider } from '@vcmap-cesium/engine';
7
+ import type BaseCesiumMap from '../../map/baseCesiumMap.js';
8
+ import type StyleItem from '../../style/styleItem.js';
9
+ import type { AttributeProvider } from '../../featureProvider/abstractAttributeProvider.js';
10
+ import type { FeatureLayerImplementation } from '../featureLayer.js';
11
+ import type FeatureVisibility from '../featureVisibility.js';
12
+ import type GlobalHider from '../globalHider.js';
13
+ import type { I3SImplementationOptions } from '../i3sLayer.js';
14
+ import LayerImplementation from '../layerImplementation.js';
15
+ import { allowPicking, vcsLayerName } from '../layerSymbols.js';
16
+ import { getResourceOrUrl } from './resourceHelper.js';
17
+ import {
18
+ createCesiumStylingContext,
19
+ createTilesetEventListeners,
20
+ } from './cesiumTilesetCesiumImpl.js';
21
+
22
+ class I3SCesiumImpl
23
+ extends LayerImplementation<BaseCesiumMap>
24
+ implements FeatureLayerImplementation
25
+ {
26
+ static get className(): string {
27
+ return 'I3SCesiumImpl';
28
+ }
29
+
30
+ data: I3SDataProvider | null;
31
+ i3sOptions: I3SImplementationOptions;
32
+ splitDirection: SplitDirection;
33
+ style: StyleItem;
34
+ featureVisibility: FeatureVisibility;
35
+ globalHider: GlobalHider | undefined;
36
+ allowPicking: boolean;
37
+
38
+ attributeProvider?: AttributeProvider;
39
+ private _initializedPromise: Promise<I3SDataProvider> | null = null;
40
+ private _destroyStyle: (() => void) | null = null;
41
+ styleContent: (content: Cesium3DTileContent) => void;
42
+ updateStyle: (style: StyleItem) => void;
43
+ applyStyle: (tile: Cesium3DTile) => void;
44
+
45
+ constructor(map: BaseCesiumMap, options: I3SImplementationOptions) {
46
+ super(map, options);
47
+ this.data = null;
48
+ this.i3sOptions = options;
49
+ this.splitDirection = options.splitDirection;
50
+ this.style = options.style;
51
+ this.featureVisibility = options.featureVisibility;
52
+ this.globalHider = options.globalHider;
53
+ this.allowPicking = options.allowPicking;
54
+ this.attributeProvider = options.attributeProvider;
55
+
56
+ const stylingContext = createCesiumStylingContext(this);
57
+ this.styleContent = stylingContext.styleContent;
58
+ this.updateStyle = stylingContext.updateStyle;
59
+ this.applyStyle = stylingContext.applyStyle;
60
+ this._destroyStyle = stylingContext.destroy;
61
+ }
62
+
63
+ async initialize(): Promise<void> {
64
+ if (!this._initializedPromise) {
65
+ this._initializedPromise = I3SDataProvider.fromUrl(
66
+ getResourceOrUrl(this.url!, this.headers),
67
+ { ...this.i3sOptions, show: false },
68
+ );
69
+ this.data = await this._initializedPromise;
70
+
71
+ if (this.isDestroyed) {
72
+ this.data.destroy();
73
+ return;
74
+ }
75
+ this.data[vcsLayerName] = this.name;
76
+ this.data[allowPicking] = this.allowPicking;
77
+ this.data.layers.forEach(({ tileset }) => {
78
+ if (tileset) {
79
+ createTilesetEventListeners(this, tileset);
80
+ }
81
+ });
82
+
83
+ this.map.addPrimitiveCollection(this.data);
84
+ await super.initialize();
85
+
86
+ if (this.splitDirection) {
87
+ this.data.layers.forEach(({ tileset }) => {
88
+ if (tileset) {
89
+ tileset.splitDirection = this.splitDirection;
90
+ }
91
+ });
92
+ }
93
+ this.updateStyle(this.style);
94
+ }
95
+ await this._initializedPromise;
96
+ }
97
+
98
+ async activate(): Promise<void> {
99
+ await super.activate();
100
+ if (this.active && this.data) {
101
+ this.data.show = true;
102
+ }
103
+ }
104
+
105
+ deactivate(): void {
106
+ super.deactivate();
107
+ if (this.data) {
108
+ this.data.show = false;
109
+ }
110
+ }
111
+
112
+ updateSplitDirection(splitDirection: SplitDirection): void {
113
+ this.splitDirection = splitDirection;
114
+ if (this.data) {
115
+ this.data.layers.forEach(({ tileset }) => {
116
+ if (tileset) {
117
+ tileset.splitDirection = splitDirection;
118
+ }
119
+ });
120
+ }
121
+ }
122
+
123
+ destroy(): void {
124
+ if (this.data) {
125
+ if (this.map.initialized) {
126
+ const toRemove = this.data;
127
+ this.map.removePrimitiveCollection(toRemove);
128
+ } else {
129
+ this.data.destroy();
130
+ }
131
+ this.data = null;
132
+ }
133
+
134
+ if (this._destroyStyle) {
135
+ this._destroyStyle();
136
+ }
137
+
138
+ super.destroy();
139
+ }
140
+ }
141
+ export default I3SCesiumImpl;
@@ -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;
@@ -91,10 +91,11 @@ export default class VcsQuadtreeTileProvider
91
91
  this.tilingScheme,
92
92
  );
93
93
 
94
+ const { tileProvider } = layerOptions;
94
95
  const { dataLevels, dataRange } = getDataTiles(
95
- layerOptions.minLevel,
96
- layerOptions.maxLevel,
97
- layerOptions.tileProvider,
96
+ layerOptions.minLevel ?? tileProvider.baseLevels.at(-1) ?? 0,
97
+ layerOptions.maxLevel ?? tileProvider.baseLevels[0],
98
+ tileProvider,
98
99
  );
99
100
  this._dataLevels = dataLevels;
100
101
  this._dataRange = dataRange;
@@ -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,
@@ -33,8 +33,14 @@ class VectorRasterTileCesiumImpl extends RasterLayerCesiumImpl {
33
33
  imageryProvider: undefined | VectorTileImageryProvider = undefined;
34
34
 
35
35
  constructor(map: CesiumMap, options: VectorTileImplementationOptions) {
36
+ const minRenderingLevel = options.minLevel;
37
+ const maxRenderingLevel = options.maxLevel;
36
38
  const rasterLayerOptions: RasterLayerImplementationOptions = {
39
+ maxLevel: 25,
40
+ minLevel: 0,
37
41
  ...options,
42
+ minRenderingLevel,
43
+ maxRenderingLevel,
38
44
  tilingSchema: TilingScheme.MERCATOR,
39
45
  opacity: 1,
40
46
  };
@@ -50,12 +56,7 @@ class VectorRasterTileCesiumImpl extends RasterLayerCesiumImpl {
50
56
  headers: this.headers,
51
57
  });
52
58
 
53
- const layerOptions: CesiumImageryLayer.ConstructorOptions = {
54
- alpha: this.opacity,
55
- splitDirection: this.splitDirection,
56
- minimumTerrainLevel: this.minLevel,
57
- maximumTerrainLevel: this.maxLevel,
58
- };
59
+ const layerOptions = this.getCesiumLayerOptions();
59
60
  if (this.extent && this.extent.isValid()) {
60
61
  const extent = this.extent.getCoordinatesInProjection(wgs84Projection);
61
62
  layerOptions.rectangle = Rectangle.fromDegrees(
@@ -17,9 +17,9 @@ import type { Feature } from 'ol/index.js';
17
17
  // eslint-disable-next-line import/no-named-default
18
18
  import type { default as Style, StyleFunction } from 'ol/style/Style.js';
19
19
  import type TileProvider from '../tileProvider/tileProvider.js';
20
- import { rectangleToExtent } from '../tileProvider/tileProvider.js';
21
20
  import { wgs84ToMercatorTransformer } from '../../util/projection.js';
22
21
  import CanvasTileRenderer from '../../ol/render/canvas/canvasTileRenderer.js';
22
+ import { rectangleToMercatorExtent } from '../../util/math.js';
23
23
 
24
24
  export function toContext(
25
25
  extent: Extent,
@@ -222,7 +222,7 @@ class VectorTileImageryProvider {
222
222
  y,
223
223
  level,
224
224
  );
225
- const extent = rectangleToExtent(rectangle);
225
+ const extent = rectangleToMercatorExtent(rectangle);
226
226
  const center = Rectangle.center(rectangle);
227
227
  return getCanvasFromFeatures(features, extent, center, this._tileSize);
228
228
  }
@@ -4,7 +4,7 @@ import {
4
4
  type CustomShader,
5
5
  Matrix4,
6
6
  } from '@vcmap-cesium/engine';
7
- import { check, maybe } from '@vcsuite/check';
7
+ import { check, is, maybe, oneOf } from '@vcsuite/check';
8
8
  import { parseInteger } from '@vcsuite/parsers';
9
9
  import type { Coordinate } from 'ol/coordinate.js';
10
10
  import type { VectorStyleItemOptions } from '../style/vectorStyleItem.js';
@@ -23,6 +23,14 @@ 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';
28
+ import AbstractAttributeProvider, {
29
+ type AbstractAttributeProviderOptions,
30
+ type AttributeProvider,
31
+ } from '../featureProvider/abstractAttributeProvider.js';
32
+ import { getProviderForOption } from '../featureProvider/featureProviderFactory.js';
33
+ import CompositeFeatureProvider from '../featureProvider/compositeFeatureProvider.js';
26
34
 
27
35
  export type CesiumTilesetOptions = LayerOptions & {
28
36
  /**
@@ -44,6 +52,10 @@ export type CesiumTilesetOptions = LayerOptions & {
44
52
  * a css string color to be used as an outline.
45
53
  */
46
54
  outlineColor?: string;
55
+ /**
56
+ * an optional attribute provider to provide custom attributes for the tileset features on load
57
+ */
58
+ attributeProvider?: AttributeProvider | AbstractAttributeProviderOptions;
47
59
  };
48
60
 
49
61
  export type CesiumTilesetTilesetProperties = {
@@ -59,6 +71,7 @@ export type CesiumTilesetImplementationOptions =
59
71
  modelMatrix?: Matrix4;
60
72
  offset?: Coordinate;
61
73
  customShader?: CustomShader;
74
+ attributeProvider?: AttributeProvider;
62
75
  };
63
76
 
64
77
  /**
@@ -94,14 +107,15 @@ class CesiumTilesetLayer extends FeatureLayer<CesiumTilesetCesiumImpl> {
94
107
 
95
108
  private _offset: Coordinate | undefined;
96
109
 
97
- protected _supportedMaps = [CesiumMap.className];
110
+ protected _supportedMaps = [CesiumMap.className, PanoramaMap.className];
98
111
 
99
112
  private _customShader: CustomShader | undefined = undefined;
100
113
 
114
+ private _attributeProvider?: AttributeProvider;
115
+
101
116
  constructor(options: CesiumTilesetOptions) {
102
- super(options);
103
- this._supportedMaps = [CesiumMap.className];
104
117
  const defaultOptions = CesiumTilesetLayer.getDefaultOptions();
118
+ super({ ...defaultOptions, ...options });
105
119
 
106
120
  this.highlightStyle = null;
107
121
  if (options.highlightStyle) {
@@ -137,6 +151,17 @@ class CesiumTilesetLayer extends FeatureLayer<CesiumTilesetCesiumImpl> {
137
151
  this._modelMatrix = undefined;
138
152
 
139
153
  this._offset = options.offset || defaultOptions.offset;
154
+
155
+ const attributeProvider = getProviderForOption(options.attributeProvider);
156
+
157
+ if (
158
+ is(
159
+ attributeProvider,
160
+ oneOf(CompositeFeatureProvider, AbstractAttributeProvider),
161
+ )
162
+ ) {
163
+ this._attributeProvider = attributeProvider;
164
+ }
140
165
  }
141
166
 
142
167
  /**
@@ -187,6 +212,26 @@ class CesiumTilesetLayer extends FeatureLayer<CesiumTilesetCesiumImpl> {
187
212
  }
188
213
  }
189
214
 
215
+ get attributeProvider(): AttributeProvider | undefined {
216
+ return this._attributeProvider;
217
+ }
218
+
219
+ set attributeProvider(provider: AttributeProvider | undefined) {
220
+ check(
221
+ provider,
222
+ maybe(oneOf(AbstractAttributeProvider, CompositeFeatureProvider)),
223
+ );
224
+
225
+ if (this._attributeProvider !== provider) {
226
+ this._attributeProvider = provider;
227
+ this.forceRedraw().catch((e: unknown) => {
228
+ this.getLogger().error(
229
+ `Error forcing redraw after setting attribute provider: ${String(e)}`,
230
+ );
231
+ });
232
+ }
233
+ }
234
+
190
235
  getImplementationOptions(): CesiumTilesetImplementationOptions {
191
236
  return {
192
237
  ...super.getImplementationOptions(),
@@ -195,11 +240,12 @@ class CesiumTilesetLayer extends FeatureLayer<CesiumTilesetCesiumImpl> {
195
240
  modelMatrix: this.modelMatrix,
196
241
  offset: this.offset,
197
242
  customShader: this.customShader,
243
+ attributeProvider: this._attributeProvider,
198
244
  };
199
245
  }
200
246
 
201
247
  createImplementationsForMap(map: VcsMap): CesiumTilesetCesiumImpl[] {
202
- if (map instanceof CesiumMap) {
248
+ if (map instanceof BaseCesiumMap) {
203
249
  return [
204
250
  new CesiumTilesetCesiumImpl(map, this.getImplementationOptions()),
205
251
  ];
@@ -244,9 +290,10 @@ class CesiumTilesetLayer extends FeatureLayer<CesiumTilesetCesiumImpl> {
244
290
  });
245
291
  }
246
292
 
247
- toJSON(): CesiumTilesetOptions {
248
- const config: CesiumTilesetOptions = super.toJSON();
249
- const defaultOptions = CesiumTilesetLayer.getDefaultOptions();
293
+ toJSON(
294
+ defaultOptions = CesiumTilesetLayer.getDefaultOptions(),
295
+ ): CesiumTilesetOptions {
296
+ const config: CesiumTilesetOptions = super.toJSON(defaultOptions);
250
297
  if (this.highlightStyle) {
251
298
  config.highlightStyle = this.highlightStyle.toJSON();
252
299
  }
@@ -282,6 +329,10 @@ class CesiumTilesetLayer extends FeatureLayer<CesiumTilesetCesiumImpl> {
282
329
  config.offset = this.offset.slice();
283
330
  }
284
331
 
332
+ if (this._attributeProvider) {
333
+ config.attributeProvider = this._attributeProvider.toJSON();
334
+ }
335
+
285
336
  return config;
286
337
  }
287
338
 
@@ -289,6 +340,7 @@ class CesiumTilesetLayer extends FeatureLayer<CesiumTilesetCesiumImpl> {
289
340
  * disposes of this layer, removes instances from the current maps and the framework
290
341
  */
291
342
  destroy(): void {
343
+ this.attributeProvider?.destroy();
292
344
  super.destroy();
293
345
  }
294
346
  }
@@ -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();