@vcmap/core 6.1.11 → 6.2.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 (798) hide show
  1. package/README.md +8 -6
  2. package/build/buildShader.js +61 -0
  3. package/build/postinstall.js +6 -3
  4. package/dist/cesium.d.ts +52 -18
  5. package/dist/geojson.d.ts +3 -2
  6. package/dist/index.d.ts +239 -109
  7. package/dist/index.js +78 -63
  8. package/dist/index.js.map +1 -1
  9. package/dist/ol.d.ts +27 -29
  10. package/dist/src/category/category.d.ts +3 -2
  11. package/dist/src/category/category.js +2 -2
  12. package/dist/src/category/category.js.map +1 -1
  13. package/dist/src/category/categoryCollection.d.ts +3 -2
  14. package/dist/src/category/categoryCollection.js.map +1 -1
  15. package/dist/src/cesium/cesium3DTileFeature.d.ts +2 -1
  16. package/dist/src/cesium/cesium3DTileFeature.js +2 -3
  17. package/dist/src/cesium/cesium3DTileFeature.js.map +1 -1
  18. package/dist/src/cesium/cesiumVcsCameraPrimitive.js +6 -5
  19. package/dist/src/cesium/cesiumVcsCameraPrimitive.js.map +1 -1
  20. package/dist/src/cesium/entity.js +1 -1
  21. package/dist/src/cesium/entity.js.map +1 -1
  22. package/dist/src/classRegistry.d.ts +4 -4
  23. package/dist/src/classRegistry.js +2 -0
  24. package/dist/src/classRegistry.js.map +1 -1
  25. package/dist/src/featureProvider/abstractFeatureProvider.d.ts +2 -1
  26. package/dist/src/featureProvider/abstractFeatureProvider.js +8 -2
  27. package/dist/src/featureProvider/abstractFeatureProvider.js.map +1 -1
  28. package/dist/src/featureProvider/wmsFeatureProvider.d.ts +38 -10
  29. package/dist/src/featureProvider/wmsFeatureProvider.js +69 -15
  30. package/dist/src/featureProvider/wmsFeatureProvider.js.map +1 -1
  31. package/dist/src/interaction/abstractInteraction.d.ts +5 -4
  32. package/dist/src/interaction/abstractInteraction.js +1 -1
  33. package/dist/src/interaction/abstractInteraction.js.map +1 -1
  34. package/dist/src/interaction/coordinateAtPixel.js +23 -0
  35. package/dist/src/interaction/coordinateAtPixel.js.map +1 -1
  36. package/dist/src/interaction/eventHandler.d.ts +4 -3
  37. package/dist/src/interaction/eventHandler.js +1 -1
  38. package/dist/src/interaction/eventHandler.js.map +1 -1
  39. package/dist/src/interaction/featureAtPixelInteraction.d.ts +5 -0
  40. package/dist/src/interaction/featureAtPixelInteraction.js +7 -4
  41. package/dist/src/interaction/featureAtPixelInteraction.js.map +1 -1
  42. package/dist/src/interaction/featureProviderInteraction.js.map +1 -1
  43. package/dist/src/interaction/interactionType.js +1 -0
  44. package/dist/src/interaction/interactionType.js.map +1 -1
  45. package/dist/src/interaction/panoramaFeatureHighlight.d.ts +29 -0
  46. package/dist/src/interaction/panoramaFeatureHighlight.js +88 -0
  47. package/dist/src/interaction/panoramaFeatureHighlight.js.map +1 -0
  48. package/dist/src/interaction/panoramaImageSelection.d.ts +8 -0
  49. package/dist/src/interaction/panoramaImageSelection.js +29 -0
  50. package/dist/src/interaction/panoramaImageSelection.js.map +1 -0
  51. package/dist/src/layer/cesium/cesiumTilesetCesiumImpl.d.ts +6 -5
  52. package/dist/src/layer/cesium/cesiumTilesetCesiumImpl.js +2 -2
  53. package/dist/src/layer/cesium/cesiumTilesetCesiumImpl.js.map +1 -1
  54. package/dist/src/layer/cesium/dataSourceCesiumImpl.d.ts +3 -2
  55. package/dist/src/layer/cesium/dataSourceCesiumImpl.js.map +1 -1
  56. package/dist/src/layer/cesium/resourceHelper.js +0 -1
  57. package/dist/src/layer/cesium/resourceHelper.js.map +1 -1
  58. package/dist/src/layer/cesium/sourceVectorContextSync.d.ts +2 -2
  59. package/dist/src/layer/cesium/sourceVectorContextSync.js +1 -1
  60. package/dist/src/layer/cesium/sourceVectorContextSync.js.map +1 -1
  61. package/dist/src/layer/cesium/terrainCesiumImpl.d.ts +1 -1
  62. package/dist/src/layer/cesium/vcsTile/vcsChildTile.d.ts +3 -2
  63. package/dist/src/layer/cesium/vcsTile/vcsChildTile.js +1 -1
  64. package/dist/src/layer/cesium/vcsTile/vcsChildTile.js.map +1 -1
  65. package/dist/src/layer/cesium/vcsTile/vcsDebugTile.d.ts +3 -2
  66. package/dist/src/layer/cesium/vcsTile/vcsDebugTile.js +1 -1
  67. package/dist/src/layer/cesium/vcsTile/vcsDebugTile.js.map +1 -1
  68. package/dist/src/layer/cesium/vcsTile/vcsNoDataTile.d.ts +3 -2
  69. package/dist/src/layer/cesium/vcsTile/vcsNoDataTile.js +1 -1
  70. package/dist/src/layer/cesium/vcsTile/vcsNoDataTile.js.map +1 -1
  71. package/dist/src/layer/cesium/vcsTile/vcsQuadtreeTileProvider.d.ts +6 -5
  72. package/dist/src/layer/cesium/vcsTile/vcsQuadtreeTileProvider.js +4 -4
  73. package/dist/src/layer/cesium/vcsTile/vcsQuadtreeTileProvider.js.map +1 -1
  74. package/dist/src/layer/cesium/vcsTile/vcsTileHelpers.d.ts +6 -5
  75. package/dist/src/layer/cesium/vcsTile/vcsTileHelpers.js.map +1 -1
  76. package/dist/src/layer/cesium/vcsTile/vcsVectorTile.d.ts +3 -2
  77. package/dist/src/layer/cesium/vcsTile/vcsVectorTile.js +1 -1
  78. package/dist/src/layer/cesium/vcsTile/vcsVectorTile.js.map +1 -1
  79. package/dist/src/layer/cesium/vectorCesiumImpl.js +1 -1
  80. package/dist/src/layer/cesium/vectorCesiumImpl.js.map +1 -1
  81. package/dist/src/layer/cesium/vectorContext.d.ts +9 -8
  82. package/dist/src/layer/cesium/vectorContext.js +6 -5
  83. package/dist/src/layer/cesium/vectorContext.js.map +1 -1
  84. package/dist/src/layer/cesium/vectorRasterTileCesiumImpl.d.ts +1 -1
  85. package/dist/src/layer/cesium/vectorRasterTileCesiumImpl.js +1 -1
  86. package/dist/src/layer/cesium/vectorRasterTileCesiumImpl.js.map +1 -1
  87. package/dist/src/layer/cesium/vectorTileCesiumImpl.d.ts +3 -3
  88. package/dist/src/layer/cesium/vectorTileCesiumImpl.js +2 -1
  89. package/dist/src/layer/cesium/vectorTileCesiumImpl.js.map +1 -1
  90. package/dist/src/layer/cesium/vectorTileImageryProvider.d.ts +1 -1
  91. package/dist/src/layer/cesium/vectorTileImageryProvider.js +3 -2
  92. package/dist/src/layer/cesium/vectorTileImageryProvider.js.map +1 -1
  93. package/dist/src/layer/cesium/wmsCesiumImpl.js +3 -2
  94. package/dist/src/layer/cesium/wmsCesiumImpl.js.map +1 -1
  95. package/dist/src/layer/cesiumTilesetLayer.d.ts +6 -4
  96. package/dist/src/layer/cesiumTilesetLayer.js.map +1 -1
  97. package/dist/src/layer/czmlLayer.js.map +1 -1
  98. package/dist/src/layer/dataSourceLayer.d.ts +4 -2
  99. package/dist/src/layer/dataSourceLayer.js +1 -1
  100. package/dist/src/layer/dataSourceLayer.js.map +1 -1
  101. package/dist/src/layer/featureLayer.d.ts +4 -2
  102. package/dist/src/layer/featureLayer.js.map +1 -1
  103. package/dist/src/layer/featureStoreFeatureVisibility.d.ts +2 -1
  104. package/dist/src/layer/featureStoreFeatureVisibility.js.map +1 -1
  105. package/dist/src/layer/featureStoreLayer.d.ts +8 -6
  106. package/dist/src/layer/featureStoreLayer.js +2 -2
  107. package/dist/src/layer/featureStoreLayer.js.map +1 -1
  108. package/dist/src/layer/featureStoreLayerChanges.d.ts +1 -1
  109. package/dist/src/layer/featureStoreLayerChanges.js.map +1 -1
  110. package/dist/src/layer/featureVisibility.d.ts +2 -1
  111. package/dist/src/layer/featureVisibility.js.map +1 -1
  112. package/dist/src/layer/flatGeobufHelpers.d.ts +18 -3
  113. package/dist/src/layer/flatGeobufHelpers.js +21 -1
  114. package/dist/src/layer/flatGeobufHelpers.js.map +1 -1
  115. package/dist/src/layer/flatGeobufLayer.d.ts +2 -1
  116. package/dist/src/layer/flatGeobufLayer.js.map +1 -1
  117. package/dist/src/layer/geojsonHelpers.d.ts +1 -1
  118. package/dist/src/layer/geojsonHelpers.js +8 -6
  119. package/dist/src/layer/geojsonHelpers.js.map +1 -1
  120. package/dist/src/layer/geojsonLayer.d.ts +2 -1
  121. package/dist/src/layer/geojsonLayer.js +3 -1
  122. package/dist/src/layer/geojsonLayer.js.map +1 -1
  123. package/dist/src/layer/globalHider.d.ts +1 -1
  124. package/dist/src/layer/globalHider.js.map +1 -1
  125. package/dist/src/layer/layer.d.ts +9 -7
  126. package/dist/src/layer/layer.js +1 -1
  127. package/dist/src/layer/layer.js.map +1 -1
  128. package/dist/src/layer/oblique/obliqueHelpers.js +2 -0
  129. package/dist/src/layer/oblique/obliqueHelpers.js.map +1 -1
  130. package/dist/src/layer/oblique/sourceObliqueSync.d.ts +1 -1
  131. package/dist/src/layer/oblique/sourceObliqueSync.js +7 -7
  132. package/dist/src/layer/oblique/sourceObliqueSync.js.map +1 -1
  133. package/dist/src/layer/oblique/vectorObliqueImpl.d.ts +2 -2
  134. package/dist/src/layer/oblique/vectorObliqueImpl.js +3 -3
  135. package/dist/src/layer/oblique/vectorObliqueImpl.js.map +1 -1
  136. package/dist/src/layer/openStreetMapLayer.d.ts +5 -4
  137. package/dist/src/layer/openStreetMapLayer.js +1 -1
  138. package/dist/src/layer/openStreetMapLayer.js.map +1 -1
  139. package/dist/src/layer/openlayers/layerOpenlayersImpl.d.ts +1 -1
  140. package/dist/src/layer/openlayers/layerOpenlayersImpl.js +0 -1
  141. package/dist/src/layer/openlayers/layerOpenlayersImpl.js.map +1 -1
  142. package/dist/src/layer/openlayers/loadFunctionHelpers.js +0 -1
  143. package/dist/src/layer/openlayers/loadFunctionHelpers.js.map +1 -1
  144. package/dist/src/layer/openlayers/tileDebugOpenlayersImpl.d.ts +1 -1
  145. package/dist/src/layer/openlayers/tileDebugOpenlayersImpl.js +2 -2
  146. package/dist/src/layer/openlayers/tileDebugOpenlayersImpl.js.map +1 -1
  147. package/dist/src/layer/openlayers/vectorOpenlayersImpl.js +1 -1
  148. package/dist/src/layer/openlayers/vectorOpenlayersImpl.js.map +1 -1
  149. package/dist/src/layer/openlayers/vectorTileOpenlayersImpl.js +1 -1
  150. package/dist/src/layer/openlayers/vectorTileOpenlayersImpl.js.map +1 -1
  151. package/dist/src/layer/openlayers/wmsOpenlayersImpl.d.ts +1 -1
  152. package/dist/src/layer/panorama/panoramaDatasetPanoramaImpl.d.ts +13 -0
  153. package/dist/src/layer/panorama/panoramaDatasetPanoramaImpl.js +34 -0
  154. package/dist/src/layer/panorama/panoramaDatasetPanoramaImpl.js.map +1 -0
  155. package/dist/src/layer/panorama/vectorTilePanoramaImpl.d.ts +28 -0
  156. package/dist/src/layer/panorama/vectorTilePanoramaImpl.js +114 -0
  157. package/dist/src/layer/panorama/vectorTilePanoramaImpl.js.map +1 -0
  158. package/dist/src/layer/panoramaDatasetLayer.d.ts +54 -0
  159. package/dist/src/layer/panoramaDatasetLayer.js +201 -0
  160. package/dist/src/layer/panoramaDatasetLayer.js.map +1 -0
  161. package/dist/src/layer/pointCloudLayer.d.ts +8 -5
  162. package/dist/src/layer/pointCloudLayer.js +1 -1
  163. package/dist/src/layer/pointCloudLayer.js.map +1 -1
  164. package/dist/src/layer/rasterLayer.d.ts +6 -4
  165. package/dist/src/layer/rasterLayer.js.map +1 -1
  166. package/dist/src/layer/singleImageLayer.d.ts +3 -2
  167. package/dist/src/layer/singleImageLayer.js.map +1 -1
  168. package/dist/src/layer/terrainHelpers.d.ts +1 -1
  169. package/dist/src/layer/terrainHelpers.js.map +1 -1
  170. package/dist/src/layer/terrainLayer.d.ts +3 -2
  171. package/dist/src/layer/terrainLayer.js.map +1 -1
  172. package/dist/src/layer/tileLoadedHelper.d.ts +2 -2
  173. package/dist/src/layer/tileProvider/flatGeobufTileProvider.d.ts +7 -4
  174. package/dist/src/layer/tileProvider/flatGeobufTileProvider.js +10 -2
  175. package/dist/src/layer/tileProvider/flatGeobufTileProvider.js.map +1 -1
  176. package/dist/src/layer/tileProvider/mvtTileProvider.d.ts +3 -2
  177. package/dist/src/layer/tileProvider/mvtTileProvider.js +3 -3
  178. package/dist/src/layer/tileProvider/mvtTileProvider.js.map +1 -1
  179. package/dist/src/layer/tileProvider/staticFeatureTileProvider.d.ts +3 -2
  180. package/dist/src/layer/tileProvider/staticFeatureTileProvider.js +0 -1
  181. package/dist/src/layer/tileProvider/staticFeatureTileProvider.js.map +1 -1
  182. package/dist/src/layer/tileProvider/staticGeojsonTileProvider.d.ts +2 -1
  183. package/dist/src/layer/tileProvider/staticGeojsonTileProvider.js +0 -1
  184. package/dist/src/layer/tileProvider/staticGeojsonTileProvider.js.map +1 -1
  185. package/dist/src/layer/tileProvider/tileProvider.d.ts +3 -2
  186. package/dist/src/layer/tileProvider/tileProvider.js +10 -3
  187. package/dist/src/layer/tileProvider/tileProvider.js.map +1 -1
  188. package/dist/src/layer/tileProvider/urlTemplateTileProvider.d.ts +2 -1
  189. package/dist/src/layer/tileProvider/urlTemplateTileProvider.js.map +1 -1
  190. package/dist/src/layer/tmsLayer.d.ts +3 -2
  191. package/dist/src/layer/tmsLayer.js +1 -1
  192. package/dist/src/layer/tmsLayer.js.map +1 -1
  193. package/dist/src/layer/vectorHelpers.d.ts +2 -2
  194. package/dist/src/layer/vectorHelpers.js +1 -1
  195. package/dist/src/layer/vectorHelpers.js.map +1 -1
  196. package/dist/src/layer/vectorLayer.d.ts +12 -8
  197. package/dist/src/layer/vectorLayer.js +1 -1
  198. package/dist/src/layer/vectorLayer.js.map +1 -1
  199. package/dist/src/layer/vectorProperties.d.ts +3 -3
  200. package/dist/src/layer/vectorProperties.js +4 -0
  201. package/dist/src/layer/vectorProperties.js.map +1 -1
  202. package/dist/src/layer/vectorSymbols.d.ts +8 -0
  203. package/dist/src/layer/vectorSymbols.js +8 -0
  204. package/dist/src/layer/vectorSymbols.js.map +1 -1
  205. package/dist/src/layer/vectorTileLayer.d.ts +17 -10
  206. package/dist/src/layer/vectorTileLayer.js +8 -1
  207. package/dist/src/layer/vectorTileLayer.js.map +1 -1
  208. package/dist/src/layer/wfsLayer.d.ts +2 -1
  209. package/dist/src/layer/wfsLayer.js +6 -4
  210. package/dist/src/layer/wfsLayer.js.map +1 -1
  211. package/dist/src/layer/wmsHelpers.js +2 -2
  212. package/dist/src/layer/wmsHelpers.js.map +1 -1
  213. package/dist/src/layer/wmsLayer.d.ts +4 -3
  214. package/dist/src/layer/wmsLayer.js.map +1 -1
  215. package/dist/src/layer/wmtsLayer.d.ts +3 -2
  216. package/dist/src/layer/wmtsLayer.js +1 -1
  217. package/dist/src/layer/wmtsLayer.js.map +1 -1
  218. package/dist/src/map/baseOLMap.d.ts +1 -1
  219. package/dist/src/map/baseOLMap.js +17 -8
  220. package/dist/src/map/baseOLMap.js.map +1 -1
  221. package/dist/src/map/cameraLimiter.d.ts +2 -1
  222. package/dist/src/map/cameraLimiter.js.map +1 -1
  223. package/dist/src/map/cesiumMap.d.ts +5 -7
  224. package/dist/src/map/cesiumMap.js +27 -186
  225. package/dist/src/map/cesiumMap.js.map +1 -1
  226. package/dist/src/map/cesiumMapHelpers.d.ts +7 -0
  227. package/dist/src/map/cesiumMapHelpers.js +144 -0
  228. package/dist/src/map/cesiumMapHelpers.js.map +1 -0
  229. package/dist/src/map/navigation/cameraHelper.d.ts +3 -2
  230. package/dist/src/map/navigation/cameraHelper.js.map +1 -1
  231. package/dist/src/map/navigation/cesiumNavigation.d.ts +4 -3
  232. package/dist/src/map/navigation/cesiumNavigation.js.map +1 -1
  233. package/dist/src/map/navigation/controller/controller.d.ts +1 -1
  234. package/dist/src/map/navigation/controller/controller.js +2 -2
  235. package/dist/src/map/navigation/controller/controller.js.map +1 -1
  236. package/dist/src/map/navigation/controller/keyboardController.d.ts +3 -2
  237. package/dist/src/map/navigation/controller/keyboardController.js +4 -2
  238. package/dist/src/map/navigation/controller/keyboardController.js.map +1 -1
  239. package/dist/src/map/navigation/easingHelper.d.ts +1 -1
  240. package/dist/src/map/navigation/easingHelper.js +1 -1
  241. package/dist/src/map/navigation/easingHelper.js.map +1 -1
  242. package/dist/src/map/navigation/navigation.d.ts +6 -6
  243. package/dist/src/map/navigation/navigation.js +6 -2
  244. package/dist/src/map/navigation/navigation.js.map +1 -1
  245. package/dist/src/map/navigation/navigationImpl.d.ts +2 -2
  246. package/dist/src/map/navigation/obliqueNavigation.d.ts +4 -3
  247. package/dist/src/map/navigation/obliqueNavigation.js +3 -1
  248. package/dist/src/map/navigation/obliqueNavigation.js.map +1 -1
  249. package/dist/src/map/navigation/openlayersNavigation.d.ts +4 -3
  250. package/dist/src/map/navigation/openlayersNavigation.js.map +1 -1
  251. package/dist/src/map/navigation/viewHelper.d.ts +2 -2
  252. package/dist/src/map/navigation/viewHelper.js +0 -1
  253. package/dist/src/map/navigation/viewHelper.js.map +1 -1
  254. package/dist/src/map/obliqueMap.d.ts +3 -3
  255. package/dist/src/map/obliqueMap.js +1 -1
  256. package/dist/src/map/obliqueMap.js.map +1 -1
  257. package/dist/src/map/panoramaMap.d.ts +98 -0
  258. package/dist/src/map/panoramaMap.js +293 -0
  259. package/dist/src/map/panoramaMap.js.map +1 -0
  260. package/dist/src/map/vcsMap.d.ts +3 -3
  261. package/dist/src/map/vcsMap.js +17 -11
  262. package/dist/src/map/vcsMap.js.map +1 -1
  263. package/dist/src/moduleIdSymbol.js +0 -1
  264. package/dist/src/moduleIdSymbol.js.map +1 -1
  265. package/dist/src/oblique/defaultObliqueCollection.js +3 -1
  266. package/dist/src/oblique/defaultObliqueCollection.js.map +1 -1
  267. package/dist/src/oblique/helpers.d.ts +1 -1
  268. package/dist/src/oblique/helpers.js +1 -1
  269. package/dist/src/oblique/helpers.js.map +1 -1
  270. package/dist/src/oblique/obliqueCollection.d.ts +3 -2
  271. package/dist/src/oblique/obliqueCollection.js.map +1 -1
  272. package/dist/src/oblique/obliqueDataSet.d.ts +2 -1
  273. package/dist/src/oblique/obliqueDataSet.js.map +1 -1
  274. package/dist/src/oblique/obliqueImage.d.ts +1 -1
  275. package/dist/src/oblique/obliqueProvider.d.ts +1 -1
  276. package/dist/src/oblique/obliqueProvider.js.map +1 -1
  277. package/dist/src/oblique/obliqueView.js +1 -0
  278. package/dist/src/oblique/obliqueView.js.map +1 -1
  279. package/dist/src/oblique/parseImageJson.js +2 -3
  280. package/dist/src/oblique/parseImageJson.js.map +1 -1
  281. package/dist/src/ol/feature.js.map +1 -1
  282. package/dist/src/ol/geom/circle.js.map +1 -1
  283. package/dist/src/ol/render/canvas/canvasTileRenderer.js +0 -1
  284. package/dist/src/ol/render/canvas/canvasTileRenderer.js.map +1 -1
  285. package/dist/src/ol/source/ClusterEnhancedVectorSource.d.ts +1 -1
  286. package/dist/src/ol/source/VcsCluster.d.ts +3 -3
  287. package/dist/src/ol/source/VcsCluster.js.map +1 -1
  288. package/dist/src/overrideClassRegistry.d.ts +3 -3
  289. package/dist/src/overrideClassRegistry.js +1 -0
  290. package/dist/src/overrideClassRegistry.js.map +1 -1
  291. package/dist/src/panorama/fieldOfView.d.ts +57 -0
  292. package/dist/src/panorama/fieldOfView.js +135 -0
  293. package/dist/src/panorama/fieldOfView.js.map +1 -0
  294. package/dist/src/panorama/panoramaCameraController.d.ts +35 -0
  295. package/dist/src/panorama/panoramaCameraController.js +146 -0
  296. package/dist/src/panorama/panoramaCameraController.js.map +1 -0
  297. package/dist/src/panorama/panoramaImage.d.ts +135 -0
  298. package/dist/src/panorama/panoramaImage.js +269 -0
  299. package/dist/src/panorama/panoramaImage.js.map +1 -0
  300. package/dist/src/panorama/panoramaImageCache.d.ts +8 -0
  301. package/dist/src/panorama/panoramaImageCache.js +18 -0
  302. package/dist/src/panorama/panoramaImageCache.js.map +1 -0
  303. package/dist/src/panorama/panoramaImageView.d.ts +25 -0
  304. package/dist/src/panorama/panoramaImageView.js +331 -0
  305. package/dist/src/panorama/panoramaImageView.js.map +1 -0
  306. package/dist/src/panorama/panoramaTile.d.ts +19 -0
  307. package/dist/src/panorama/panoramaTile.js +57 -0
  308. package/dist/src/panorama/panoramaTile.js.map +1 -0
  309. package/dist/src/panorama/panoramaTileCache.d.ts +16 -0
  310. package/dist/src/panorama/panoramaTileCache.js +34 -0
  311. package/dist/src/panorama/panoramaTileCache.js.map +1 -0
  312. package/dist/src/panorama/panoramaTileCoordinate.d.ts +56 -0
  313. package/dist/src/panorama/panoramaTileCoordinate.js +110 -0
  314. package/dist/src/panorama/panoramaTileCoordinate.js.map +1 -0
  315. package/dist/src/panorama/panoramaTileMaterial.d.ts +102 -0
  316. package/dist/src/panorama/panoramaTileMaterial.js +225 -0
  317. package/dist/src/panorama/panoramaTileMaterial.js.map +1 -0
  318. package/dist/src/panorama/panoramaTileMaterialFS.shader.d.ts +2 -0
  319. package/dist/src/panorama/panoramaTileMaterialFS.shader.js +170 -0
  320. package/dist/src/panorama/panoramaTileMaterialFS.shader.js.map +1 -0
  321. package/dist/src/panorama/panoramaTilePrimitiveCollection.d.ts +31 -0
  322. package/dist/src/panorama/panoramaTilePrimitiveCollection.js +113 -0
  323. package/dist/src/panorama/panoramaTilePrimitiveCollection.js.map +1 -0
  324. package/dist/src/panorama/panoramaTileProvider.d.ts +67 -0
  325. package/dist/src/panorama/panoramaTileProvider.js +313 -0
  326. package/dist/src/panorama/panoramaTileProvider.js.map +1 -0
  327. package/dist/src/panorama/sphericalCoordinates.d.ts +20 -0
  328. package/dist/src/panorama/sphericalCoordinates.js +78 -0
  329. package/dist/src/panorama/sphericalCoordinates.js.map +1 -0
  330. package/dist/src/style/arrowStyle.d.ts +1 -1
  331. package/dist/src/style/arrowStyle.js.map +1 -1
  332. package/dist/src/style/declarativeStyleItem.d.ts +1 -1
  333. package/dist/src/style/declarativeStyleItem.js +12 -14
  334. package/dist/src/style/declarativeStyleItem.js.map +1 -1
  335. package/dist/src/style/styleFactory.d.ts +2 -2
  336. package/dist/src/style/styleFactory.js +1 -2
  337. package/dist/src/style/styleFactory.js.map +1 -1
  338. package/dist/src/style/styleHelpers.d.ts +2 -2
  339. package/dist/src/style/styleHelpers.js +6 -6
  340. package/dist/src/style/styleHelpers.js.map +1 -1
  341. package/dist/src/style/styleItem.d.ts +4 -2
  342. package/dist/src/style/styleItem.js +3 -1
  343. package/dist/src/style/styleItem.js.map +1 -1
  344. package/dist/src/style/vectorStyleItem.d.ts +7 -5
  345. package/dist/src/style/vectorStyleItem.js +9 -19
  346. package/dist/src/style/vectorStyleItem.js.map +1 -1
  347. package/dist/src/style/writeStyle.d.ts +2 -2
  348. package/dist/src/style/writeStyle.js.map +1 -1
  349. package/dist/src/util/clipping/clippingObject.js.map +1 -1
  350. package/dist/src/util/clipping/clippingObjectManager.js.map +1 -1
  351. package/dist/src/util/clipping/clippingPolygonHelper.d.ts +2 -1
  352. package/dist/src/util/clipping/clippingPolygonHelper.js.map +1 -1
  353. package/dist/src/util/clipping/clippingPolygonObject.d.ts +4 -3
  354. package/dist/src/util/clipping/clippingPolygonObject.js.map +1 -1
  355. package/dist/src/util/clipping/clippingPolygonObjectCollection.d.ts +3 -4
  356. package/dist/src/util/clipping/clippingPolygonObjectCollection.js +37 -11
  357. package/dist/src/util/clipping/clippingPolygonObjectCollection.js.map +1 -1
  358. package/dist/src/util/collection.js.map +1 -1
  359. package/dist/src/util/createAbsoluteFeature.d.ts +4 -0
  360. package/dist/src/util/createAbsoluteFeature.js +98 -0
  361. package/dist/src/util/createAbsoluteFeature.js.map +1 -0
  362. package/dist/src/util/displayQuality/displayQuality.d.ts +3 -5
  363. package/dist/src/util/displayQuality/displayQuality.js +4 -5
  364. package/dist/src/util/displayQuality/displayQuality.js.map +1 -1
  365. package/dist/src/util/editor/createFeatureSession.d.ts +4 -3
  366. package/dist/src/util/editor/createFeatureSession.js.map +1 -1
  367. package/dist/src/util/editor/editFeaturesSession.d.ts +2 -1
  368. package/dist/src/util/editor/editFeaturesSession.js +3 -1
  369. package/dist/src/util/editor/editFeaturesSession.js.map +1 -1
  370. package/dist/src/util/editor/editGeometrySession.d.ts +3 -2
  371. package/dist/src/util/editor/editGeometrySession.js.map +1 -1
  372. package/dist/src/util/editor/editorHelpers.d.ts +5 -4
  373. package/dist/src/util/editor/editorHelpers.js +4 -0
  374. package/dist/src/util/editor/editorHelpers.js.map +1 -1
  375. package/dist/src/util/editor/editorSessionHelpers.d.ts +3 -3
  376. package/dist/src/util/editor/editorSessionHelpers.js.map +1 -1
  377. package/dist/src/util/editor/interactions/createCircleInteraction.d.ts +2 -1
  378. package/dist/src/util/editor/interactions/createCircleInteraction.js.map +1 -1
  379. package/dist/src/util/editor/interactions/createLineStringInteraction.d.ts +3 -2
  380. package/dist/src/util/editor/interactions/createLineStringInteraction.js.map +1 -1
  381. package/dist/src/util/editor/interactions/createPointInteraction.d.ts +3 -2
  382. package/dist/src/util/editor/interactions/createPointInteraction.js.map +1 -1
  383. package/dist/src/util/editor/interactions/createPolygonInteraction.d.ts +3 -2
  384. package/dist/src/util/editor/interactions/createPolygonInteraction.js.map +1 -1
  385. package/dist/src/util/editor/interactions/creationSnapping.d.ts +2 -2
  386. package/dist/src/util/editor/interactions/creationSnapping.js +1 -1
  387. package/dist/src/util/editor/interactions/creationSnapping.js.map +1 -1
  388. package/dist/src/util/editor/interactions/editFeaturesMouseOverInteraction.d.ts +2 -1
  389. package/dist/src/util/editor/interactions/editFeaturesMouseOverInteraction.js.map +1 -1
  390. package/dist/src/util/editor/interactions/editGeometryMouseOverInteraction.d.ts +2 -1
  391. package/dist/src/util/editor/interactions/editGeometryMouseOverInteraction.js.map +1 -1
  392. package/dist/src/util/editor/interactions/ensureHandlerSelectionInteraction.d.ts +2 -1
  393. package/dist/src/util/editor/interactions/ensureHandlerSelectionInteraction.js.map +1 -1
  394. package/dist/src/util/editor/interactions/insertVertexInteraction.d.ts +3 -2
  395. package/dist/src/util/editor/interactions/insertVertexInteraction.js.map +1 -1
  396. package/dist/src/util/editor/interactions/layerSnapping.d.ts +4 -4
  397. package/dist/src/util/editor/interactions/layerSnapping.js +1 -1
  398. package/dist/src/util/editor/interactions/layerSnapping.js.map +1 -1
  399. package/dist/src/util/editor/interactions/mapInteractionController.d.ts +2 -1
  400. package/dist/src/util/editor/interactions/mapInteractionController.js +1 -0
  401. package/dist/src/util/editor/interactions/mapInteractionController.js.map +1 -1
  402. package/dist/src/util/editor/interactions/removeVertexInteraction.d.ts +3 -2
  403. package/dist/src/util/editor/interactions/removeVertexInteraction.js.map +1 -1
  404. package/dist/src/util/editor/interactions/rightClickInteraction.d.ts +2 -1
  405. package/dist/src/util/editor/interactions/rightClickInteraction.js.map +1 -1
  406. package/dist/src/util/editor/interactions/segmentLengthInteraction.d.ts +2 -1
  407. package/dist/src/util/editor/interactions/segmentLengthInteraction.js.map +1 -1
  408. package/dist/src/util/editor/interactions/selectFeatureMouseOverInteraction.d.ts +3 -2
  409. package/dist/src/util/editor/interactions/selectFeatureMouseOverInteraction.js +13 -13
  410. package/dist/src/util/editor/interactions/selectFeatureMouseOverInteraction.js.map +1 -1
  411. package/dist/src/util/editor/interactions/selectMultiFeatureInteraction.d.ts +3 -3
  412. package/dist/src/util/editor/interactions/selectMultiFeatureInteraction.js +1 -1
  413. package/dist/src/util/editor/interactions/selectMultiFeatureInteraction.js.map +1 -1
  414. package/dist/src/util/editor/interactions/selectSingleFeatureInteraction.d.ts +2 -1
  415. package/dist/src/util/editor/interactions/selectSingleFeatureInteraction.js +1 -1
  416. package/dist/src/util/editor/interactions/selectSingleFeatureInteraction.js.map +1 -1
  417. package/dist/src/util/editor/interactions/translateVertexInteraction.d.ts +3 -2
  418. package/dist/src/util/editor/interactions/translateVertexInteraction.js.map +1 -1
  419. package/dist/src/util/editor/interactions/translationSnapping.d.ts +2 -2
  420. package/dist/src/util/editor/interactions/translationSnapping.js +1 -1
  421. package/dist/src/util/editor/interactions/translationSnapping.js.map +1 -1
  422. package/dist/src/util/editor/selectFeaturesSession.d.ts +3 -2
  423. package/dist/src/util/editor/selectFeaturesSession.js +1 -1
  424. package/dist/src/util/editor/selectFeaturesSession.js.map +1 -1
  425. package/dist/src/util/editor/snappingHelpers.d.ts +3 -3
  426. package/dist/src/util/editor/snappingHelpers.js.map +1 -1
  427. package/dist/src/util/editor/transformation/create2DHandlers.d.ts +2 -1
  428. package/dist/src/util/editor/transformation/create2DHandlers.js.map +1 -1
  429. package/dist/src/util/editor/transformation/create3DHandlers.d.ts +3 -2
  430. package/dist/src/util/editor/transformation/create3DHandlers.js.map +1 -1
  431. package/dist/src/util/editor/transformation/extrudeInteraction.d.ts +3 -2
  432. package/dist/src/util/editor/transformation/extrudeInteraction.js +1 -1
  433. package/dist/src/util/editor/transformation/extrudeInteraction.js.map +1 -1
  434. package/dist/src/util/editor/transformation/rotateInteraction.d.ts +4 -2
  435. package/dist/src/util/editor/transformation/rotateInteraction.js +1 -1
  436. package/dist/src/util/editor/transformation/rotateInteraction.js.map +1 -1
  437. package/dist/src/util/editor/transformation/scaleInteraction.d.ts +3 -2
  438. package/dist/src/util/editor/transformation/scaleInteraction.js +1 -1
  439. package/dist/src/util/editor/transformation/scaleInteraction.js.map +1 -1
  440. package/dist/src/util/editor/transformation/transformationHandler.d.ts +2 -1
  441. package/dist/src/util/editor/transformation/transformationHandler.js +1 -1
  442. package/dist/src/util/editor/transformation/transformationHandler.js.map +1 -1
  443. package/dist/src/util/editor/transformation/translateInteraction.d.ts +3 -2
  444. package/dist/src/util/editor/transformation/translateInteraction.js +2 -2
  445. package/dist/src/util/editor/transformation/translateInteraction.js.map +1 -1
  446. package/dist/src/util/exclusiveManager.d.ts +1 -1
  447. package/dist/src/util/exclusiveManager.js.map +1 -1
  448. package/dist/src/util/featureconverter/arcToCesium.d.ts +1 -1
  449. package/dist/src/util/featureconverter/arcToCesium.js +1 -2
  450. package/dist/src/util/featureconverter/arcToCesium.js.map +1 -1
  451. package/dist/src/util/featureconverter/circleToCesium.d.ts +1 -1
  452. package/dist/src/util/featureconverter/circleToCesium.js +1 -1
  453. package/dist/src/util/featureconverter/circleToCesium.js.map +1 -1
  454. package/dist/src/util/featureconverter/clampedPrimitive.d.ts +2 -1
  455. package/dist/src/util/featureconverter/clampedPrimitive.js +0 -1
  456. package/dist/src/util/featureconverter/clampedPrimitive.js.map +1 -1
  457. package/dist/src/util/featureconverter/convert.d.ts +4 -3
  458. package/dist/src/util/featureconverter/convert.js +1 -1
  459. package/dist/src/util/featureconverter/convert.js.map +1 -1
  460. package/dist/src/util/featureconverter/extent3D.d.ts +2 -2
  461. package/dist/src/util/featureconverter/extent3D.js.map +1 -1
  462. package/dist/src/util/featureconverter/lineStringToCesium.d.ts +5 -5
  463. package/dist/src/util/featureconverter/lineStringToCesium.js +1 -2
  464. package/dist/src/util/featureconverter/lineStringToCesium.js.map +1 -1
  465. package/dist/src/util/featureconverter/pointHelpers.d.ts +6 -5
  466. package/dist/src/util/featureconverter/pointHelpers.js +2 -3
  467. package/dist/src/util/featureconverter/pointHelpers.js.map +1 -1
  468. package/dist/src/util/featureconverter/pointToCesium.d.ts +6 -11
  469. package/dist/src/util/featureconverter/pointToCesium.js +3 -20
  470. package/dist/src/util/featureconverter/pointToCesium.js.map +1 -1
  471. package/dist/src/util/featureconverter/polygonToCesium.d.ts +1 -1
  472. package/dist/src/util/featureconverter/polygonToCesium.js +1 -1
  473. package/dist/src/util/featureconverter/polygonToCesium.js.map +1 -1
  474. package/dist/src/util/featureconverter/storeyHelpers.d.ts +2 -2
  475. package/dist/src/util/featureconverter/vectorGeometryFactory.d.ts +2 -2
  476. package/dist/src/util/featureconverter/vectorGeometryFactory.js.map +1 -1
  477. package/dist/src/util/featureconverter/vectorHeightInfo.d.ts +8 -2
  478. package/dist/src/util/featureconverter/vectorHeightInfo.js +17 -0
  479. package/dist/src/util/featureconverter/vectorHeightInfo.js.map +1 -1
  480. package/dist/src/util/flight/flightAnchor.js +4 -3
  481. package/dist/src/util/flight/flightAnchor.js.map +1 -1
  482. package/dist/src/util/flight/flightCollection.d.ts +2 -2
  483. package/dist/src/util/flight/flightCollection.js.map +1 -1
  484. package/dist/src/util/flight/flightHelpers.d.ts +1 -1
  485. package/dist/src/util/flight/flightInstance.d.ts +3 -2
  486. package/dist/src/util/flight/flightInstance.js.map +1 -1
  487. package/dist/src/util/flight/flightPlayer.js +1 -1
  488. package/dist/src/util/flight/flightPlayer.js.map +1 -1
  489. package/dist/src/util/flight/flightVisualizer.d.ts +1 -1
  490. package/dist/src/util/flight/flightVisualizer.js.map +1 -1
  491. package/dist/src/util/geometryHelpers.d.ts +3 -5
  492. package/dist/src/util/geometryHelpers.js +0 -91
  493. package/dist/src/util/geometryHelpers.js.map +1 -1
  494. package/dist/src/util/hiddenObjects.d.ts +2 -2
  495. package/dist/src/util/hiddenObjects.js +0 -1
  496. package/dist/src/util/hiddenObjects.js.map +1 -1
  497. package/dist/src/util/indexedCollection.js.map +1 -1
  498. package/dist/src/util/isMobile.js +3 -2
  499. package/dist/src/util/isMobile.js.map +1 -1
  500. package/dist/src/util/layerCollection.d.ts +6 -1
  501. package/dist/src/util/layerCollection.js +5 -1
  502. package/dist/src/util/layerCollection.js.map +1 -1
  503. package/dist/src/util/locale.js +0 -1
  504. package/dist/src/util/locale.js.map +1 -1
  505. package/dist/src/util/mapCollection.d.ts +9 -4
  506. package/dist/src/util/mapCollection.js +67 -34
  507. package/dist/src/util/mapCollection.js.map +1 -1
  508. package/dist/src/util/overrideCollection.d.ts +1 -1
  509. package/dist/src/util/overrideCollection.js +3 -1
  510. package/dist/src/util/overrideCollection.js.map +1 -1
  511. package/dist/src/util/projection.d.ts +1 -1
  512. package/dist/src/util/projection.js +2 -2
  513. package/dist/src/util/projection.js.map +1 -1
  514. package/dist/src/util/renderScreenshot.d.ts +1 -1
  515. package/dist/src/util/rotation.d.ts +4 -3
  516. package/dist/src/util/rotation.js +1 -1
  517. package/dist/src/util/rotation.js.map +1 -1
  518. package/dist/src/util/urlHelpers.js +0 -1
  519. package/dist/src/util/urlHelpers.js.map +1 -1
  520. package/dist/src/util/vcsTemplate.js +2 -4
  521. package/dist/src/util/vcsTemplate.js.map +1 -1
  522. package/dist/src/util/viewpoint.d.ts +6 -2
  523. package/dist/src/util/viewpoint.js +11 -1
  524. package/dist/src/util/viewpoint.js.map +1 -1
  525. package/dist/src/vcsApp.d.ts +7 -6
  526. package/dist/src/vcsApp.js +20 -14
  527. package/dist/src/vcsApp.js.map +1 -1
  528. package/dist/src/vcsEvent.js.map +1 -1
  529. package/dist/src/vcsModuleHelpers.js +3 -3
  530. package/dist/src/vcsModuleHelpers.js.map +1 -1
  531. package/dist/src/vectorCluster/vectorClusterCesiumContext.d.ts +4 -4
  532. package/dist/src/vectorCluster/vectorClusterCesiumContext.js +1 -1
  533. package/dist/src/vectorCluster/vectorClusterCesiumContext.js.map +1 -1
  534. package/dist/src/vectorCluster/vectorClusterGroup.d.ts +9 -6
  535. package/dist/src/vectorCluster/vectorClusterGroup.js +17 -5
  536. package/dist/src/vectorCluster/vectorClusterGroup.js.map +1 -1
  537. package/dist/src/vectorCluster/vectorClusterGroupCesiumImpl.d.ts +2 -2
  538. package/dist/src/vectorCluster/vectorClusterGroupCesiumImpl.js +1 -1
  539. package/dist/src/vectorCluster/vectorClusterGroupCesiumImpl.js.map +1 -1
  540. package/dist/src/vectorCluster/vectorClusterGroupCollection.d.ts +1 -1
  541. package/dist/src/vectorCluster/vectorClusterGroupImpl.d.ts +5 -5
  542. package/dist/src/vectorCluster/vectorClusterGroupObliqueImpl.d.ts +2 -2
  543. package/dist/src/vectorCluster/vectorClusterGroupObliqueImpl.js +1 -1
  544. package/dist/src/vectorCluster/vectorClusterGroupObliqueImpl.js.map +1 -1
  545. package/dist/src/vectorCluster/vectorClusterGroupOpenlayersImpl.d.ts +2 -2
  546. package/dist/src/vectorCluster/vectorClusterStyleItem.d.ts +4 -3
  547. package/dist/src/vectorCluster/vectorClusterStyleItem.js.map +1 -1
  548. package/dist/src/vectorCluster/vectorClusterSymbols.js +0 -1
  549. package/dist/src/vectorCluster/vectorClusterSymbols.js.map +1 -1
  550. package/dist/src/workers/panoramaImageWorker.d.ts +1 -0
  551. package/dist/src/workers/panoramaImageWorker.js +34 -0
  552. package/dist/src/workers/panoramaImageWorker.js.map +1 -0
  553. package/dist/tests/data/panorama/badOrientation.tif +0 -0
  554. package/dist/tests/data/panorama/badPosition.tif +0 -0
  555. package/dist/tests/data/panorama/lowOverview.tif +0 -0
  556. package/dist/tests/data/panorama/noVersionDepth.tif +0 -0
  557. package/dist/tests/data/panorama/noVersionRgb.tif +0 -0
  558. package/dist/tests/data/panorama/testDepthGeotiff.tif +0 -0
  559. package/dist/tests/data/panorama/testRgbGeotiff.tif +0 -0
  560. package/dist/tests/unit/helpers/cesiumHelpers.d.ts +6 -2
  561. package/dist/tests/unit/helpers/cesiumHelpers.js +15 -6
  562. package/dist/tests/unit/helpers/cesiumHelpers.js.map +1 -1
  563. package/dist/tests/unit/helpers/flatGeobufHelpers.d.ts +2 -0
  564. package/dist/tests/unit/helpers/flatGeobufHelpers.js +13 -0
  565. package/dist/tests/unit/helpers/flatGeobufHelpers.js.map +1 -0
  566. package/dist/tests/unit/helpers/helpers.d.ts +4 -0
  567. package/dist/tests/unit/helpers/helpers.js +26 -1
  568. package/dist/tests/unit/helpers/helpers.js.map +1 -1
  569. package/dist/tests/unit/helpers/panoramaHelpers.d.ts +30 -0
  570. package/dist/tests/unit/helpers/panoramaHelpers.js +76 -0
  571. package/dist/tests/unit/helpers/panoramaHelpers.js.map +1 -0
  572. package/index.ts +316 -279
  573. package/package.json +17 -49
  574. package/src/category/category.ts +9 -6
  575. package/src/category/categoryCollection.ts +4 -3
  576. package/src/cesium/cesium.d.ts +52 -18
  577. package/src/cesium/cesium3DTileFeature.ts +6 -7
  578. package/src/cesium/cesiumVcsCameraPrimitive.ts +6 -5
  579. package/src/cesium/entity.ts +1 -1
  580. package/src/classRegistry.ts +19 -18
  581. package/src/featureProvider/abstractFeatureProvider.ts +8 -4
  582. package/src/featureProvider/wmsFeatureProvider.ts +97 -23
  583. package/src/global.d.ts +6 -1
  584. package/src/interaction/abstractInteraction.ts +5 -5
  585. package/src/interaction/coordinateAtPixel.ts +37 -0
  586. package/src/interaction/eventHandler.ts +6 -8
  587. package/src/interaction/featureAtPixelInteraction.ts +24 -13
  588. package/src/interaction/featureProviderInteraction.ts +6 -7
  589. package/src/interaction/interactionType.ts +1 -0
  590. package/src/interaction/panoramaFeatureHighlight.ts +109 -0
  591. package/src/interaction/panoramaImageSelection.ts +37 -0
  592. package/src/layer/cesium/cesiumTilesetCesiumImpl.ts +14 -10
  593. package/src/layer/cesium/dataSourceCesiumImpl.ts +8 -6
  594. package/src/layer/cesium/resourceHelper.ts +0 -1
  595. package/src/layer/cesium/sourceVectorContextSync.ts +4 -4
  596. package/src/layer/cesium/terrainCesiumImpl.ts +1 -1
  597. package/src/layer/cesium/vcsTile/vcsChildTile.ts +3 -3
  598. package/src/layer/cesium/vcsTile/vcsDebugTile.ts +5 -10
  599. package/src/layer/cesium/vcsTile/vcsNoDataTile.ts +3 -3
  600. package/src/layer/cesium/vcsTile/vcsQuadtreeTileProvider.ts +19 -17
  601. package/src/layer/cesium/vcsTile/vcsTileHelpers.ts +10 -8
  602. package/src/layer/cesium/vcsTile/vcsVectorTile.ts +7 -11
  603. package/src/layer/cesium/vectorCesiumImpl.ts +2 -4
  604. package/src/layer/cesium/vectorContext.ts +32 -25
  605. package/src/layer/cesium/vectorRasterTileCesiumImpl.ts +2 -2
  606. package/src/layer/cesium/vectorTileCesiumImpl.ts +5 -7
  607. package/src/layer/cesium/vectorTileImageryProvider.ts +4 -4
  608. package/src/layer/cesium/wmsCesiumImpl.ts +3 -2
  609. package/src/layer/cesiumTilesetLayer.ts +6 -8
  610. package/src/layer/czmlLayer.ts +2 -2
  611. package/src/layer/dataSourceLayer.ts +4 -6
  612. package/src/layer/featureLayer.ts +6 -4
  613. package/src/layer/featureStoreFeatureVisibility.ts +2 -1
  614. package/src/layer/featureStoreLayer.ts +18 -14
  615. package/src/layer/featureStoreLayerChanges.ts +7 -7
  616. package/src/layer/featureVisibility.ts +3 -2
  617. package/src/layer/flatGeobufHelpers.ts +46 -6
  618. package/src/layer/flatGeobufLayer.ts +2 -1
  619. package/src/layer/geojsonHelpers.ts +11 -8
  620. package/src/layer/geojsonLayer.ts +8 -5
  621. package/src/layer/globalHider.ts +5 -3
  622. package/src/layer/layer.ts +14 -14
  623. package/src/layer/oblique/obliqueHelpers.ts +2 -0
  624. package/src/layer/oblique/sourceObliqueSync.ts +9 -9
  625. package/src/layer/oblique/vectorObliqueImpl.ts +6 -8
  626. package/src/layer/openStreetMapLayer.ts +7 -8
  627. package/src/layer/openlayers/layerOpenlayersImpl.ts +2 -3
  628. package/src/layer/openlayers/loadFunctionHelpers.ts +0 -1
  629. package/src/layer/openlayers/tileDebugOpenlayersImpl.ts +3 -3
  630. package/src/layer/openlayers/vectorOpenlayersImpl.ts +1 -1
  631. package/src/layer/openlayers/vectorTileOpenlayersImpl.ts +3 -3
  632. package/src/layer/openlayers/wmsOpenlayersImpl.ts +1 -1
  633. package/src/layer/panorama/panoramaDatasetPanoramaImpl.ts +49 -0
  634. package/src/layer/panorama/vectorTilePanoramaImpl.ts +163 -0
  635. package/src/layer/panoramaDatasetLayer.ts +283 -0
  636. package/src/layer/pointCloudLayer.ts +9 -12
  637. package/src/layer/rasterLayer.ts +6 -5
  638. package/src/layer/singleImageLayer.ts +3 -2
  639. package/src/layer/terrainHelpers.ts +2 -1
  640. package/src/layer/terrainLayer.ts +3 -2
  641. package/src/layer/tileLoadedHelper.ts +2 -2
  642. package/src/layer/tileProvider/flatGeobufTileProvider.ts +22 -10
  643. package/src/layer/tileProvider/mvtTileProvider.ts +4 -6
  644. package/src/layer/tileProvider/staticFeatureTileProvider.ts +3 -3
  645. package/src/layer/tileProvider/staticGeojsonTileProvider.ts +2 -2
  646. package/src/layer/tileProvider/tileProvider.ts +15 -10
  647. package/src/layer/tileProvider/urlTemplateTileProvider.ts +2 -1
  648. package/src/layer/tmsLayer.ts +3 -3
  649. package/src/layer/vectorHelpers.ts +3 -4
  650. package/src/layer/vectorLayer.ts +14 -15
  651. package/src/layer/vectorProperties.ts +27 -16
  652. package/src/layer/vectorSymbols.ts +10 -0
  653. package/src/layer/vectorTileLayer.ts +39 -29
  654. package/src/layer/wfsLayer.ts +10 -7
  655. package/src/layer/wmsHelpers.ts +2 -2
  656. package/src/layer/wmsLayer.ts +5 -5
  657. package/src/layer/wmtsLayer.ts +3 -3
  658. package/src/map/baseOLMap.ts +18 -9
  659. package/src/map/cameraLimiter.ts +1 -1
  660. package/src/map/cesiumMap.ts +49 -265
  661. package/src/map/cesiumMapHelpers.ts +219 -0
  662. package/src/map/navigation/cameraHelper.ts +2 -3
  663. package/src/map/navigation/cesiumNavigation.ts +5 -4
  664. package/src/map/navigation/controller/controller.ts +3 -6
  665. package/src/map/navigation/controller/keyboardController.ts +7 -7
  666. package/src/map/navigation/easingHelper.ts +2 -5
  667. package/src/map/navigation/navigation.ts +18 -14
  668. package/src/map/navigation/navigationImpl.ts +2 -2
  669. package/src/map/navigation/obliqueNavigation.ts +7 -6
  670. package/src/map/navigation/openlayersNavigation.ts +4 -3
  671. package/src/map/navigation/viewHelper.ts +2 -3
  672. package/src/map/obliqueMap.ts +7 -9
  673. package/src/map/panoramaMap.ts +410 -0
  674. package/src/map/vcsMap.ts +19 -16
  675. package/src/moduleIdSymbol.ts +0 -1
  676. package/src/oblique/defaultObliqueCollection.ts +1 -0
  677. package/src/oblique/helpers.ts +2 -4
  678. package/src/oblique/obliqueCollection.ts +7 -7
  679. package/src/oblique/obliqueDataSet.ts +7 -6
  680. package/src/oblique/obliqueImage.ts +1 -1
  681. package/src/oblique/obliqueProvider.ts +3 -3
  682. package/src/oblique/obliqueView.ts +1 -0
  683. package/src/oblique/parseImageJson.ts +11 -12
  684. package/src/ol/feature.ts +1 -0
  685. package/src/ol/geojson.d.ts +3 -2
  686. package/src/ol/geom/circle.ts +1 -1
  687. package/src/ol/ol.d.ts +27 -29
  688. package/src/ol/render/canvas/canvasTileRenderer.js +0 -1
  689. package/src/ol/source/ClusterEnhancedVectorSource.ts +1 -1
  690. package/src/ol/source/VcsCluster.ts +4 -4
  691. package/src/overrideClassRegistry.ts +14 -10
  692. package/src/panorama/fieldOfView.ts +254 -0
  693. package/src/panorama/panoramaCameraController.ts +206 -0
  694. package/src/panorama/panoramaImage.ts +531 -0
  695. package/src/panorama/panoramaImageCache.ts +19 -0
  696. package/src/panorama/panoramaImageView.ts +448 -0
  697. package/src/panorama/panoramaTile.ts +89 -0
  698. package/src/panorama/panoramaTileCache.ts +40 -0
  699. package/src/panorama/panoramaTileCoordinate.ts +166 -0
  700. package/src/panorama/panoramaTileMaterial.ts +323 -0
  701. package/src/panorama/panoramaTileMaterialFS.glsl +165 -0
  702. package/src/panorama/panoramaTilePrimitiveCollection.ts +158 -0
  703. package/src/panorama/panoramaTileProvider.ts +536 -0
  704. package/src/panorama/sphericalCoordinates.ts +96 -0
  705. package/src/style/arrowStyle.ts +1 -1
  706. package/src/style/declarativeStyleItem.ts +19 -19
  707. package/src/style/styleFactory.ts +6 -7
  708. package/src/style/styleHelpers.ts +9 -9
  709. package/src/style/styleItem.ts +8 -3
  710. package/src/style/vectorStyleItem.ts +24 -30
  711. package/src/style/writeStyle.ts +3 -2
  712. package/src/util/clipping/clippingObject.ts +2 -3
  713. package/src/util/clipping/clippingObjectManager.ts +3 -3
  714. package/src/util/clipping/clippingPolygonHelper.ts +1 -2
  715. package/src/util/clipping/clippingPolygonObject.ts +4 -3
  716. package/src/util/clipping/clippingPolygonObjectCollection.ts +43 -27
  717. package/src/util/collection.ts +1 -1
  718. package/src/util/createAbsoluteFeature.ts +155 -0
  719. package/src/util/displayQuality/displayQuality.ts +7 -8
  720. package/src/util/editor/createFeatureSession.ts +12 -12
  721. package/src/util/editor/editFeaturesSession.ts +6 -4
  722. package/src/util/editor/editGeometrySession.ts +4 -3
  723. package/src/util/editor/editorHelpers.ts +14 -12
  724. package/src/util/editor/editorSessionHelpers.ts +13 -12
  725. package/src/util/editor/interactions/createCircleInteraction.ts +2 -3
  726. package/src/util/editor/interactions/createLineStringInteraction.ts +3 -4
  727. package/src/util/editor/interactions/createPointInteraction.ts +3 -4
  728. package/src/util/editor/interactions/createPolygonInteraction.ts +3 -4
  729. package/src/util/editor/interactions/creationSnapping.ts +4 -7
  730. package/src/util/editor/interactions/editFeaturesMouseOverInteraction.ts +2 -3
  731. package/src/util/editor/interactions/editGeometryMouseOverInteraction.ts +4 -4
  732. package/src/util/editor/interactions/ensureHandlerSelectionInteraction.ts +2 -3
  733. package/src/util/editor/interactions/insertVertexInteraction.ts +3 -4
  734. package/src/util/editor/interactions/layerSnapping.ts +6 -8
  735. package/src/util/editor/interactions/mapInteractionController.ts +5 -3
  736. package/src/util/editor/interactions/removeVertexInteraction.ts +4 -4
  737. package/src/util/editor/interactions/rightClickInteraction.ts +2 -3
  738. package/src/util/editor/interactions/segmentLengthInteraction.ts +2 -3
  739. package/src/util/editor/interactions/selectFeatureMouseOverInteraction.ts +15 -14
  740. package/src/util/editor/interactions/selectMultiFeatureInteraction.ts +9 -9
  741. package/src/util/editor/interactions/selectSingleFeatureInteraction.ts +5 -7
  742. package/src/util/editor/interactions/translateVertexInteraction.ts +4 -4
  743. package/src/util/editor/interactions/translationSnapping.ts +4 -7
  744. package/src/util/editor/selectFeaturesSession.ts +5 -8
  745. package/src/util/editor/snappingHelpers.ts +21 -20
  746. package/src/util/editor/transformation/create2DHandlers.ts +1 -1
  747. package/src/util/editor/transformation/create3DHandlers.ts +3 -3
  748. package/src/util/editor/transformation/extrudeInteraction.ts +5 -5
  749. package/src/util/editor/transformation/rotateInteraction.ts +7 -6
  750. package/src/util/editor/transformation/scaleInteraction.ts +7 -6
  751. package/src/util/editor/transformation/transformationHandler.ts +3 -3
  752. package/src/util/editor/transformation/translateInteraction.ts +7 -11
  753. package/src/util/exclusiveManager.ts +1 -1
  754. package/src/util/featureconverter/arcToCesium.ts +4 -6
  755. package/src/util/featureconverter/circleToCesium.ts +3 -5
  756. package/src/util/featureconverter/clampedPrimitive.ts +6 -5
  757. package/src/util/featureconverter/convert.ts +22 -24
  758. package/src/util/featureconverter/extent3D.ts +3 -3
  759. package/src/util/featureconverter/lineStringToCesium.ts +7 -7
  760. package/src/util/featureconverter/pointHelpers.ts +10 -11
  761. package/src/util/featureconverter/pointToCesium.ts +18 -44
  762. package/src/util/featureconverter/polygonToCesium.ts +3 -5
  763. package/src/util/featureconverter/storeyHelpers.ts +2 -2
  764. package/src/util/featureconverter/vectorGeometryFactory.ts +41 -39
  765. package/src/util/featureconverter/vectorHeightInfo.ts +60 -30
  766. package/src/util/flight/flightAnchor.ts +4 -3
  767. package/src/util/flight/flightCollection.ts +3 -2
  768. package/src/util/flight/flightHelpers.ts +1 -1
  769. package/src/util/flight/flightInstance.ts +7 -4
  770. package/src/util/flight/flightPlayer.ts +2 -2
  771. package/src/util/flight/flightVisualizer.ts +2 -2
  772. package/src/util/geometryHelpers.ts +3 -135
  773. package/src/util/hiddenObjects.ts +3 -4
  774. package/src/util/indexedCollection.ts +1 -1
  775. package/src/util/isMobile.ts +2 -1
  776. package/src/util/layerCollection.ts +7 -2
  777. package/src/util/locale.ts +0 -1
  778. package/src/util/mapCollection.ts +104 -47
  779. package/src/util/overrideCollection.ts +4 -5
  780. package/src/util/projection.ts +3 -7
  781. package/src/util/renderScreenshot.ts +2 -2
  782. package/src/util/rotation.ts +3 -4
  783. package/src/util/urlHelpers.ts +0 -1
  784. package/src/util/vcsTemplate.ts +6 -5
  785. package/src/util/viewpoint.ts +20 -3
  786. package/src/vcsApp.ts +42 -42
  787. package/src/vcsEvent.ts +1 -1
  788. package/src/vcsModuleHelpers.ts +4 -3
  789. package/src/vectorCluster/vectorClusterCesiumContext.ts +8 -9
  790. package/src/vectorCluster/vectorClusterGroup.ts +26 -16
  791. package/src/vectorCluster/vectorClusterGroupCesiumImpl.ts +10 -10
  792. package/src/vectorCluster/vectorClusterGroupCollection.ts +1 -1
  793. package/src/vectorCluster/vectorClusterGroupImpl.ts +5 -5
  794. package/src/vectorCluster/vectorClusterGroupObliqueImpl.ts +4 -6
  795. package/src/vectorCluster/vectorClusterGroupOpenlayersImpl.ts +2 -2
  796. package/src/vectorCluster/vectorClusterStyleItem.ts +5 -3
  797. package/src/vectorCluster/vectorClusterSymbols.ts +0 -1
  798. package/src/workers/panoramaImageWorker.ts +50 -0
@@ -0,0 +1,448 @@
1
+ import type { Camera } from '@vcmap-cesium/engine';
2
+ import { Cartesian2, Matrix4, Cartesian3 } from '@vcmap-cesium/engine';
3
+ import { getWidth } from 'ol/extent.js';
4
+ import type { Size } from 'ol/size.js';
5
+ import { getLogger } from '@vcsuite/logger';
6
+ import type { PanoramaImage } from './panoramaImage.js';
7
+ import type { PanoramaTile } from './panoramaTile.js';
8
+ import {
9
+ getFovImageSphericalExtent,
10
+ windowPositionToImageSpherical,
11
+ } from './fieldOfView.js';
12
+ import type PanoramaMap from '../map/panoramaMap.js';
13
+ import type { PanoramaTileCoordinate } from './panoramaTileCoordinate.js';
14
+ import {
15
+ createTileCoordinate,
16
+ getDistanceToTileCoordinate,
17
+ getTileCoordinatesInImageExtent,
18
+ tileSizeInRadians,
19
+ } from './panoramaTileCoordinate.js';
20
+ import PanoramaTilePrimitiveCollection from './panoramaTilePrimitiveCollection.js';
21
+ import { imageSphericalToCartesian } from './sphericalCoordinates.js';
22
+ import { PanoramaOverlayMode } from './panoramaTileMaterial.js';
23
+
24
+ export type PanoramaImageView = {
25
+ /**
26
+ * Suspends the loading of tiles. This is used as a debug feature.
27
+ */
28
+ suspendTileLoading: boolean;
29
+ /**
30
+ * The primitive collection that contains the panorama tiles.
31
+ */
32
+ readonly tilePrimitiveCollection: PanoramaTilePrimitiveCollection;
33
+ /**
34
+ * Force a render of the panorama image. You do not need to call this for the normal rendering loop.
35
+ */
36
+ render(): void;
37
+ destroy(): void;
38
+ };
39
+
40
+ const baseLevelScaled = Symbol('baseLevelScaled');
41
+ const MIN_DEPTH_MOVEMENT_DISTANCE = 5 ** 2; // 5 pixels squared, to avoid too many updates
42
+
43
+ /**
44
+ * Creates all the tile coordinates for the minimum level of the panorama image.
45
+ * @param minLevel
46
+ */
47
+ function createMinLevelTiles(minLevel: number): PanoramaTileCoordinate[] {
48
+ const tiles: PanoramaTileCoordinate[] = [];
49
+ for (let x = 0; x < 2 ** minLevel * 2; x++) {
50
+ for (let y = 0; y < 2 ** minLevel; y++) {
51
+ tiles.push(createTileCoordinate(x, y, minLevel));
52
+ }
53
+ }
54
+ return tiles;
55
+ }
56
+
57
+ /**
58
+ * Calculates the pixel per radians for the given level and tile size.
59
+ * @param level
60
+ * @param tileSize
61
+ */
62
+ function getLevelPixelPerRadians(level: number, tileSize: Size): number {
63
+ return tileSize[0] / tileSizeInRadians(level);
64
+ }
65
+
66
+ type ImageWrapper = {
67
+ readonly image: PanoramaImage;
68
+ suspendTileLoading: boolean;
69
+ render(): void;
70
+ destroy(): void;
71
+ };
72
+
73
+ /**
74
+ * Creates an event listener that handles cursor position changes and sets the cursor position in the primitive collection based on depth information from the panorama image.
75
+ * This is set up by the panorama image wrapper, should the image have depth information.
76
+ * @param image
77
+ * @param primitiveCollection
78
+ * @param camera
79
+ * @param canvas
80
+ */
81
+ function setupDepthHandling(
82
+ image: PanoramaImage,
83
+ primitiveCollection: PanoramaTilePrimitiveCollection,
84
+ camera: Camera,
85
+ canvas: HTMLCanvasElement,
86
+ ): () => void {
87
+ let windowPositon: Cartesian2 | undefined;
88
+ const handlePointerChanged = (x?: number, y?: number): void => {
89
+ if (x != null && y != null) {
90
+ const newPosition = new Cartesian2(x, y);
91
+ if (
92
+ windowPositon &&
93
+ Cartesian2.distanceSquared(windowPositon, newPosition) <
94
+ MIN_DEPTH_MOVEMENT_DISTANCE
95
+ ) {
96
+ return;
97
+ }
98
+
99
+ windowPositon = newPosition;
100
+ const imageSpherical = windowPositionToImageSpherical(
101
+ windowPositon,
102
+ camera,
103
+ image.invModelMatrix,
104
+ );
105
+
106
+ if (imageSpherical) {
107
+ image.tileProvider
108
+ .getDepthAtImageCoordinate(imageSpherical)
109
+ .then((depth) => {
110
+ if (windowPositon !== newPosition) {
111
+ return;
112
+ }
113
+
114
+ if (depth !== undefined) {
115
+ const imageCartesian = imageSphericalToCartesian(imageSpherical);
116
+ Cartesian3.multiplyByScalar(
117
+ imageCartesian,
118
+ depth / image.maxDepth,
119
+ imageCartesian,
120
+ );
121
+ primitiveCollection.cursorPosition = imageCartesian;
122
+ } else {
123
+ primitiveCollection.cursorPosition = new Cartesian3(-1, -1, -1);
124
+ }
125
+ })
126
+ .catch(() => {
127
+ getLogger('PanoramaImageView').warning('Failed to get depth');
128
+ primitiveCollection.cursorPosition = new Cartesian3(-1, -1, -1);
129
+ });
130
+ } else {
131
+ primitiveCollection.cursorPosition = new Cartesian3(-1, -1, -1);
132
+ }
133
+ } else {
134
+ primitiveCollection.cursorPosition = new Cartesian3(-1, -1, -1);
135
+ windowPositon = undefined;
136
+ }
137
+ };
138
+
139
+ const mouseMoveHandler = (event: MouseEvent): void => {
140
+ handlePointerChanged(event.offsetX, event.offsetY);
141
+ };
142
+
143
+ const leaveHandler = (): void => {
144
+ handlePointerChanged();
145
+ };
146
+
147
+ const touchMoveHandler = (event: TouchEvent): void => {
148
+ const { clientX, clientY } = event.touches[0];
149
+ handlePointerChanged(clientX, clientY);
150
+ };
151
+
152
+ canvas.addEventListener('mousemove', mouseMoveHandler);
153
+ canvas.addEventListener('mouseleave', leaveHandler);
154
+ canvas.addEventListener('touchmove', touchMoveHandler);
155
+ canvas.addEventListener('touchend', leaveHandler);
156
+
157
+ return (): void => {
158
+ canvas.removeEventListener('mousemove', mouseMoveHandler);
159
+ canvas.removeEventListener('mouseleave', leaveHandler);
160
+ canvas.removeEventListener('touchmove', touchMoveHandler);
161
+ canvas.removeEventListener('touchend', leaveHandler);
162
+ };
163
+ }
164
+
165
+ /**
166
+ * The image wrapper is responsible for managing the panorama image tiles and rendering them.
167
+ * @param image
168
+ * @param primitiveCollection
169
+ * @param camera
170
+ * @param canvas
171
+ */
172
+ function createImageWrapper(
173
+ image: PanoramaImage,
174
+ primitiveCollection: PanoramaTilePrimitiveCollection,
175
+ camera: Camera,
176
+ canvas: HTMLCanvasElement,
177
+ ): ImageWrapper {
178
+ const { tileSize, maxLevel, minLevel, hasDepth } = image;
179
+ const baseTileCoordinates = createMinLevelTiles(minLevel);
180
+ const destroyDepth = hasDepth
181
+ ? setupDepthHandling(image, primitiveCollection, camera, canvas)
182
+ : (): void => {};
183
+
184
+ const currentTiles = new Map<string, PanoramaTile>();
185
+ let currentLevel = minLevel;
186
+ let currentTileCoordinates: PanoramaTileCoordinate[] = [
187
+ ...baseTileCoordinates,
188
+ ];
189
+
190
+ const createCurrentTiles = (): void => {
191
+ image.tileProvider.currentLevel = currentLevel;
192
+ image.tileProvider
193
+ .createVisibleTiles(currentTileCoordinates)
194
+ .forEach((tile) => {
195
+ if (!currentTiles.has(tile.tileCoordinate.key)) {
196
+ if (
197
+ tile.tileCoordinate.level === minLevel &&
198
+ !(tile as PanoramaTile & { [baseLevelScaled]?: boolean })[
199
+ baseLevelScaled
200
+ ]
201
+ ) {
202
+ tile.primitive.modelMatrix = Matrix4.multiplyByScale(
203
+ tile.primitive.modelMatrix,
204
+ new Cartesian3(1.01, 1.01, 1.01),
205
+ new Matrix4(),
206
+ );
207
+ (tile as PanoramaTile & { [baseLevelScaled]?: boolean })[
208
+ baseLevelScaled
209
+ ] = true;
210
+ }
211
+
212
+ currentTiles.set(tile.tileCoordinate.key, tile);
213
+ primitiveCollection.add(tile.primitive);
214
+ }
215
+ });
216
+ };
217
+
218
+ image.tileProvider.showIntensity =
219
+ primitiveCollection.overlay === PanoramaOverlayMode.Intensity;
220
+
221
+ const showIntensityListener =
222
+ primitiveCollection.overlayChanged.addEventListener((overlayMode) => {
223
+ image.tileProvider.showIntensity =
224
+ overlayMode === PanoramaOverlayMode.Intensity;
225
+ });
226
+
227
+ camera.setView({
228
+ destination: image.position,
229
+ orientation: {
230
+ heading: camera.heading,
231
+ pitch: image.orientation.pitch,
232
+ roll: image.orientation.roll,
233
+ },
234
+ });
235
+
236
+ const levelPixelPerRadians = new Array<number>(maxLevel); // XXX can be cached or pre calculated?
237
+ for (let i = 0; i <= maxLevel - minLevel; i++) {
238
+ levelPixelPerRadians[i] = getLevelPixelPerRadians(i + minLevel, tileSize);
239
+ }
240
+ let suspendTileLoading = false;
241
+ const render = (): void => {
242
+ if (suspendTileLoading) {
243
+ return;
244
+ }
245
+ const { extents, center: imageCenter } = getFovImageSphericalExtent(
246
+ camera,
247
+ image.invModelMatrix,
248
+ );
249
+ const currentImageRadiansWidth = extents.reduce(
250
+ (acc, extent) => acc + getWidth(extent),
251
+ 0,
252
+ );
253
+ const currentScenePixelWidth = canvas.width;
254
+ const currentRadiansPerPixel =
255
+ currentScenePixelWidth / currentImageRadiansWidth;
256
+ currentLevel = minLevel;
257
+
258
+ if (currentRadiansPerPixel > levelPixelPerRadians[maxLevel - minLevel]) {
259
+ currentLevel = maxLevel;
260
+ } else if (currentRadiansPerPixel > levelPixelPerRadians[0]) {
261
+ currentLevel =
262
+ levelPixelPerRadians.findIndex((rpp) => rpp >= currentRadiansPerPixel) +
263
+ minLevel;
264
+ }
265
+
266
+ if (currentLevel === minLevel) {
267
+ currentTileCoordinates = [];
268
+ } else if (extents.length === 1) {
269
+ currentTileCoordinates = [
270
+ ...getTileCoordinatesInImageExtent(extents[0], currentLevel),
271
+ ];
272
+ } else {
273
+ const leftExtent = extents[0];
274
+ const rightExtent = extents[1];
275
+ leftExtent[2] -= 0.0001; // dont overlap the extents since 0 === 2 * PI
276
+ currentTileCoordinates = [
277
+ ...getTileCoordinatesInImageExtent(leftExtent, currentLevel),
278
+ ...getTileCoordinatesInImageExtent(rightExtent, currentLevel),
279
+ ];
280
+ }
281
+
282
+ currentTileCoordinates = currentTileCoordinates
283
+ .map((tc) => ({
284
+ tc,
285
+ distance: getDistanceToTileCoordinate(imageCenter, tc),
286
+ }))
287
+ // we sort furthest first, since tiles are loaded from the back of the array with pop.
288
+ .sort((a, b) => b.distance - a.distance)
289
+ .map((tc) => tc.tc);
290
+
291
+ // push base tile coordinates onto the back of the array, so they are always loaded first.
292
+ currentTileCoordinates.push(...baseTileCoordinates);
293
+ currentTiles.forEach((tile) => {
294
+ if (
295
+ !currentTileCoordinates.find((c) => c.key === tile.tileCoordinate.key)
296
+ ) {
297
+ primitiveCollection.remove(tile.primitive);
298
+ currentTiles.delete(tile.tileCoordinate.key);
299
+ }
300
+ });
301
+
302
+ createCurrentTiles();
303
+ };
304
+ render();
305
+
306
+ return {
307
+ image,
308
+ get suspendTileLoading(): boolean {
309
+ return suspendTileLoading;
310
+ },
311
+ set suspendTileLoading(value: boolean) {
312
+ suspendTileLoading = value;
313
+ },
314
+ render,
315
+ destroy(): void {
316
+ currentTiles.forEach((tile) => {
317
+ primitiveCollection.remove(tile.primitive);
318
+ });
319
+ currentTiles.clear();
320
+ showIntensityListener();
321
+ destroyDepth();
322
+ },
323
+ };
324
+ }
325
+
326
+ let emptyImageOverlay: HTMLDivElement | undefined;
327
+ function getEmptyImageBitmap(): HTMLDivElement {
328
+ if (!emptyImageOverlay) {
329
+ const overlay = document.createElement('div');
330
+ overlay.style.position = 'absolute';
331
+ overlay.style.display = 'block';
332
+ overlay.style.top = '0px';
333
+ overlay.style.left = '0px';
334
+ overlay.style.bottom = '0px';
335
+ overlay.style.right = '0px';
336
+ overlay.style.backgroundColor = '#409D76';
337
+ overlay.style.padding = '8px';
338
+ overlay.style.font = 'bold 64px Monospace, Courier New';
339
+ overlay.style.textAlign = 'center';
340
+ overlay.style.alignContent = 'center';
341
+ overlay.style.color = '#424242';
342
+ overlay.innerText = 'No Image';
343
+
344
+ emptyImageOverlay = overlay;
345
+ }
346
+ return emptyImageOverlay;
347
+ }
348
+
349
+ function setupEmptyImageOverlay(container: HTMLElement): () => void {
350
+ const overlay = getEmptyImageBitmap();
351
+ container.appendChild(overlay);
352
+
353
+ let remover: (() => void) | undefined = () => {
354
+ container.removeChild(overlay);
355
+ remover = undefined; // we need to ensure this is only called once
356
+ };
357
+
358
+ return () => {
359
+ remover?.();
360
+ };
361
+ }
362
+
363
+ /**
364
+ * The panorama image view is responsible for rendering the current panorama image of a PanoramaMap.
365
+ * It will react to image changes and update the view. It tracks changes
366
+ * to the panorama camera and updates the panorama tiles accordingly. Typically, you will not
367
+ * have to create this directly, but rather use the PanoramaMap's imageView property.
368
+ * @param map
369
+ */
370
+ export function createPanoramaImageView(map: PanoramaMap): PanoramaImageView {
371
+ const { scene } = map.getCesiumWidget();
372
+ const primitiveCollection = scene.primitives.add(
373
+ new PanoramaTilePrimitiveCollection({
374
+ destroyPrimitives: false,
375
+ show: true,
376
+ }),
377
+ ) as PanoramaTilePrimitiveCollection;
378
+
379
+ const defaultPosition = Cartesian3.fromDegrees(12, 53, 0);
380
+
381
+ let currentView: ImageWrapper | undefined;
382
+ let removeOverlay: (() => void) | undefined;
383
+ scene.camera.setView({
384
+ destination: defaultPosition,
385
+ orientation: {
386
+ heading: scene.camera.heading ?? 0,
387
+ pitch: 0,
388
+ roll: 0,
389
+ },
390
+ });
391
+
392
+ let suspendTileLoading = false;
393
+
394
+ const setCurrentView = (image?: PanoramaImage): void => {
395
+ const oldView = currentView;
396
+ removeOverlay?.();
397
+ if (image) {
398
+ currentView = createImageWrapper(
399
+ image,
400
+ primitiveCollection,
401
+ scene.camera,
402
+ scene.canvas,
403
+ );
404
+ currentView.suspendTileLoading = suspendTileLoading;
405
+ } else {
406
+ currentView = undefined;
407
+ if (scene.canvas.parentElement) {
408
+ removeOverlay = setupEmptyImageOverlay(scene.canvas.parentElement);
409
+ }
410
+ }
411
+
412
+ oldView?.destroy();
413
+ };
414
+ setCurrentView(map.currentPanoramaImage);
415
+
416
+ const imageChangedListener =
417
+ map.currentImageChanged.addEventListener(setCurrentView);
418
+
419
+ const render = (): void => {
420
+ currentView?.render();
421
+ };
422
+ const cameraChangedListener = scene.camera.changed.addEventListener(render);
423
+ render();
424
+
425
+ return {
426
+ get suspendTileLoading(): boolean {
427
+ return suspendTileLoading;
428
+ },
429
+ set suspendTileLoading(value: boolean) {
430
+ suspendTileLoading = value;
431
+ if (currentView) {
432
+ currentView.suspendTileLoading = value;
433
+ }
434
+ },
435
+ get tilePrimitiveCollection(): PanoramaTilePrimitiveCollection {
436
+ return primitiveCollection;
437
+ },
438
+ render,
439
+ destroy(): void {
440
+ this.render = (): void => {};
441
+ scene.primitives.remove(primitiveCollection);
442
+ currentView?.destroy();
443
+ imageChangedListener();
444
+ cameraChangedListener();
445
+ removeOverlay?.();
446
+ },
447
+ };
448
+ }
@@ -0,0 +1,89 @@
1
+ import type { Matrix4 } from '@vcmap-cesium/engine';
2
+ import {
3
+ Cartesian3,
4
+ EllipsoidGeometry,
5
+ GeometryInstance,
6
+ MaterialAppearance,
7
+ Primitive,
8
+ VertexFormat,
9
+ } from '@vcmap-cesium/engine';
10
+ import type { Size } from 'ol/size.js';
11
+ import PanoramaTileMaterial from './panoramaTileMaterial.js';
12
+ import type { PanoramaTileCoordinate } from './panoramaTileCoordinate.js';
13
+ import { tileSizeInRadians } from './panoramaTileCoordinate.js';
14
+
15
+ export type PanoramaTile = {
16
+ readonly primitive: Primitive;
17
+ readonly tileCoordinate: PanoramaTileCoordinate;
18
+ readonly material: PanoramaTileMaterial;
19
+ destroy(): void;
20
+ };
21
+
22
+ function createPanoramaTilePrimitive(
23
+ { x, y, level }: PanoramaTileCoordinate,
24
+ modelMatrix: Matrix4,
25
+ material: PanoramaTileMaterial,
26
+ ): Primitive {
27
+ const sizeR = tileSizeInRadians(level);
28
+ const heading = x * sizeR;
29
+
30
+ const tilt = y * sizeR;
31
+ return new Primitive({
32
+ geometryInstances: [
33
+ new GeometryInstance({
34
+ geometry: new EllipsoidGeometry({
35
+ vertexFormat: VertexFormat.POSITION_AND_ST,
36
+ radii: new Cartesian3(1, 1, 1),
37
+ minimumClock: heading,
38
+ maximumClock: heading + sizeR,
39
+ minimumCone: tilt,
40
+ maximumCone: tilt + sizeR,
41
+ stackPartitions: (level + 1) * 64,
42
+ slicePartitions: (level + 1) * 64,
43
+ }),
44
+ }),
45
+ ],
46
+ appearance: new MaterialAppearance({
47
+ material,
48
+ closed: false,
49
+ flat: true,
50
+ }),
51
+ modelMatrix,
52
+ });
53
+ }
54
+
55
+ /**
56
+ * Creates a panorama tile primitive with the given tile coordinate and image. Typically only called
57
+ * by the PanoramaTileProvider when creating tiles.
58
+ * @param tileCoordinate
59
+ * @param modelMatrix
60
+ * @param tileSize
61
+ */
62
+ export function createPanoramaTile(
63
+ tileCoordinate: PanoramaTileCoordinate,
64
+ modelMatrix: Matrix4,
65
+ tileSize: Size,
66
+ ): PanoramaTile {
67
+ const material = new PanoramaTileMaterial(tileCoordinate, tileSize);
68
+ const primitive = createPanoramaTilePrimitive(
69
+ tileCoordinate,
70
+ modelMatrix,
71
+ material,
72
+ );
73
+
74
+ return {
75
+ get primitive(): Primitive {
76
+ return primitive;
77
+ },
78
+ get tileCoordinate(): PanoramaTileCoordinate {
79
+ return tileCoordinate;
80
+ },
81
+ get material(): PanoramaTileMaterial {
82
+ return material;
83
+ },
84
+ destroy(): void {
85
+ primitive.destroy();
86
+ material.destroy();
87
+ },
88
+ };
89
+ }
@@ -0,0 +1,40 @@
1
+ import LRUCache from 'ol/structs/LRUCache.js';
2
+ import type { PanoramaTile } from './panoramaTile.js';
3
+
4
+ /**
5
+ * A specialized LRU cache
6
+ */
7
+ export class PanoramaTileCache extends LRUCache<PanoramaTile> {
8
+ deleteOldest(): void {
9
+ const entry = this.pop();
10
+ if (entry) {
11
+ entry.destroy();
12
+ }
13
+ }
14
+
15
+ expireCache(usedTiles: Record<string, boolean> = {}): void {
16
+ while (this.canExpireCache()) {
17
+ const tile = this.peekLast();
18
+ if (usedTiles[tile.tileCoordinate.key]) {
19
+ break;
20
+ } else {
21
+ this.pop().destroy();
22
+ }
23
+ }
24
+ }
25
+ }
26
+
27
+ /**
28
+ * convenience function to cache a tile and cleanup all the non-visible tiles
29
+ * @param tile
30
+ * @param cache
31
+ * @param currentlyVisibleTileKeys
32
+ */
33
+ export function addTileToCache(
34
+ tile: PanoramaTile,
35
+ cache: PanoramaTileCache,
36
+ currentlyVisibleTileKeys: Record<string, boolean>,
37
+ ): void {
38
+ cache.set(tile.tileCoordinate.key, tile);
39
+ cache.expireCache(currentlyVisibleTileKeys);
40
+ }