@vcmap/core 6.2.3 → 6.3.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +3 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/src/category/category.d.ts +1 -1
- package/dist/src/category/category.js +3 -4
- package/dist/src/category/category.js.map +1 -1
- package/dist/src/featureProvider/abstractFeatureProvider.d.ts +1 -1
- package/dist/src/featureProvider/abstractFeatureProvider.js +3 -4
- package/dist/src/featureProvider/abstractFeatureProvider.js.map +1 -1
- package/dist/src/featureProvider/wmsFeatureProvider.d.ts +1 -1
- package/dist/src/featureProvider/wmsFeatureProvider.js +3 -4
- package/dist/src/featureProvider/wmsFeatureProvider.js.map +1 -1
- package/dist/src/interaction/coordinateAtPixel.js +4 -6
- package/dist/src/interaction/coordinateAtPixel.js.map +1 -1
- package/dist/src/interaction/ensurePositionInteraction.d.ts +14 -0
- package/dist/src/interaction/ensurePositionInteraction.js +42 -0
- package/dist/src/interaction/ensurePositionInteraction.js.map +1 -0
- package/dist/src/interaction/eventHandler.d.ts +3 -0
- package/dist/src/interaction/eventHandler.js +10 -1
- package/dist/src/interaction/eventHandler.js.map +1 -1
- package/dist/src/interaction/featureAtPixelInteraction.js +29 -17
- package/dist/src/interaction/featureAtPixelInteraction.js.map +1 -1
- package/dist/src/interaction/panoramaImageSelection.js +2 -2
- package/dist/src/interaction/panoramaImageSelection.js.map +1 -1
- package/dist/src/layer/cesium/cesiumTilesetCesiumImpl.d.ts +3 -3
- package/dist/src/layer/cesium/cesiumTilesetCesiumImpl.js.map +1 -1
- package/dist/src/layer/cesium/rasterLayerCesiumImpl.d.ts +3 -3
- package/dist/src/layer/cesium/rasterLayerCesiumImpl.js.map +1 -1
- package/dist/src/layer/cesium/terrainCesiumImpl.d.ts +3 -3
- package/dist/src/layer/cesium/terrainCesiumImpl.js.map +1 -1
- package/dist/src/layer/cesium/vectorContext.js +1 -1
- package/dist/src/layer/cesium/vectorContext.js.map +1 -1
- package/dist/src/layer/cesiumTilesetLayer.d.ts +1 -1
- package/dist/src/layer/cesiumTilesetLayer.js +7 -7
- package/dist/src/layer/cesiumTilesetLayer.js.map +1 -1
- package/dist/src/layer/cogLayer.d.ts +1 -1
- package/dist/src/layer/cogLayer.js +3 -4
- package/dist/src/layer/cogLayer.js.map +1 -1
- package/dist/src/layer/czmlLayer.d.ts +1 -1
- package/dist/src/layer/czmlLayer.js +4 -4
- package/dist/src/layer/czmlLayer.js.map +1 -1
- package/dist/src/layer/featureLayer.d.ts +1 -6
- package/dist/src/layer/featureLayer.js +3 -10
- package/dist/src/layer/featureLayer.js.map +1 -1
- package/dist/src/layer/featureStoreLayer.d.ts +3 -2
- package/dist/src/layer/featureStoreLayer.js +5 -5
- package/dist/src/layer/featureStoreLayer.js.map +1 -1
- package/dist/src/layer/flatGeobufLayer.d.ts +2 -0
- package/dist/src/layer/flatGeobufLayer.js +8 -0
- package/dist/src/layer/flatGeobufLayer.js.map +1 -1
- package/dist/src/layer/geojsonLayer.d.ts +1 -1
- package/dist/src/layer/geojsonLayer.js +5 -12
- package/dist/src/layer/geojsonLayer.js.map +1 -1
- package/dist/src/layer/layer.d.ts +21 -7
- package/dist/src/layer/layer.js +107 -33
- package/dist/src/layer/layer.js.map +1 -1
- package/dist/src/layer/openStreetMapLayer.d.ts +1 -1
- package/dist/src/layer/openStreetMapLayer.js +11 -6
- package/dist/src/layer/openStreetMapLayer.js.map +1 -1
- package/dist/src/layer/panorama/vectorPanoramaImpl.d.ts +38 -0
- package/dist/src/layer/panorama/vectorPanoramaImpl.js +164 -0
- package/dist/src/layer/panorama/vectorPanoramaImpl.js.map +1 -0
- package/dist/src/layer/panoramaDatasetLayer.d.ts +5 -3
- package/dist/src/layer/panoramaDatasetLayer.js +13 -7
- package/dist/src/layer/panoramaDatasetLayer.js.map +1 -1
- package/dist/src/layer/pointCloudLayer.d.ts +1 -5
- package/dist/src/layer/pointCloudLayer.js +3 -15
- package/dist/src/layer/pointCloudLayer.js.map +1 -1
- package/dist/src/layer/rasterLayer.d.ts +1 -1
- package/dist/src/layer/rasterLayer.js +4 -4
- package/dist/src/layer/rasterLayer.js.map +1 -1
- package/dist/src/layer/singleImageLayer.d.ts +1 -1
- package/dist/src/layer/singleImageLayer.js +3 -3
- package/dist/src/layer/singleImageLayer.js.map +1 -1
- package/dist/src/layer/terrainLayer.d.ts +1 -1
- package/dist/src/layer/terrainLayer.js +8 -6
- package/dist/src/layer/terrainLayer.js.map +1 -1
- package/dist/src/layer/tileProvider/flatGeobufTileProvider.d.ts +1 -1
- package/dist/src/layer/tileProvider/flatGeobufTileProvider.js +4 -3
- package/dist/src/layer/tileProvider/flatGeobufTileProvider.js.map +1 -1
- package/dist/src/layer/tileProvider/mvtTileProvider.d.ts +1 -1
- package/dist/src/layer/tileProvider/mvtTileProvider.js +3 -3
- package/dist/src/layer/tileProvider/mvtTileProvider.js.map +1 -1
- package/dist/src/layer/tileProvider/staticFeatureTileProvider.d.ts +1 -1
- package/dist/src/layer/tileProvider/staticFeatureTileProvider.js +3 -3
- package/dist/src/layer/tileProvider/staticFeatureTileProvider.js.map +1 -1
- package/dist/src/layer/tileProvider/staticGeojsonTileProvider.d.ts +1 -1
- package/dist/src/layer/tileProvider/staticGeojsonTileProvider.js +7 -4
- package/dist/src/layer/tileProvider/staticGeojsonTileProvider.js.map +1 -1
- package/dist/src/layer/tileProvider/tileProvider.d.ts +1 -1
- package/dist/src/layer/tileProvider/tileProvider.js +3 -4
- package/dist/src/layer/tileProvider/tileProvider.js.map +1 -1
- package/dist/src/layer/tileProvider/urlTemplateTileProvider.d.ts +1 -1
- package/dist/src/layer/tileProvider/urlTemplateTileProvider.js +3 -3
- package/dist/src/layer/tileProvider/urlTemplateTileProvider.js.map +1 -1
- package/dist/src/layer/tmsLayer.d.ts +1 -1
- package/dist/src/layer/tmsLayer.js +3 -10
- package/dist/src/layer/tmsLayer.js.map +1 -1
- package/dist/src/layer/vectorLayer.d.ts +11 -5
- package/dist/src/layer/vectorLayer.js +19 -8
- package/dist/src/layer/vectorLayer.js.map +1 -1
- package/dist/src/layer/vectorTileLayer.d.ts +1 -1
- package/dist/src/layer/vectorTileLayer.js +4 -5
- package/dist/src/layer/vectorTileLayer.js.map +1 -1
- package/dist/src/layer/wfsLayer.d.ts +1 -1
- package/dist/src/layer/wfsLayer.js +5 -4
- package/dist/src/layer/wfsLayer.js.map +1 -1
- package/dist/src/layer/wmsLayer.d.ts +1 -1
- package/dist/src/layer/wmsLayer.js +3 -4
- package/dist/src/layer/wmsLayer.js.map +1 -1
- package/dist/src/layer/wmtsLayer.d.ts +1 -1
- package/dist/src/layer/wmtsLayer.js +3 -10
- package/dist/src/layer/wmtsLayer.js.map +1 -1
- package/dist/src/map/baseCesiumMap.d.ts +69 -0
- package/dist/src/map/baseCesiumMap.js +381 -0
- package/dist/src/map/baseCesiumMap.js.map +1 -0
- package/dist/src/map/cesiumMap.d.ts +6 -98
- package/dist/src/map/cesiumMap.js +32 -258
- package/dist/src/map/cesiumMap.js.map +1 -1
- package/dist/src/map/obliqueMap.d.ts +1 -1
- package/dist/src/map/obliqueMap.js +3 -4
- package/dist/src/map/obliqueMap.js.map +1 -1
- package/dist/src/map/openlayersMap.d.ts +1 -1
- package/dist/src/map/openlayersMap.js +3 -4
- package/dist/src/map/openlayersMap.js.map +1 -1
- package/dist/src/map/panoramaMap.d.ts +17 -29
- package/dist/src/map/panoramaMap.js +56 -100
- package/dist/src/map/panoramaMap.js.map +1 -1
- package/dist/src/map/vcsMap.d.ts +15 -2
- package/dist/src/map/vcsMap.js +26 -3
- package/dist/src/map/vcsMap.js.map +1 -1
- package/dist/src/oblique/obliqueCollection.d.ts +1 -1
- package/dist/src/oblique/obliqueCollection.js +3 -4
- package/dist/src/oblique/obliqueCollection.js.map +1 -1
- package/dist/src/panorama/panoramaCameraController.d.ts +4 -0
- package/dist/src/panorama/panoramaCameraController.js +8 -0
- package/dist/src/panorama/panoramaCameraController.js.map +1 -1
- package/dist/src/panorama/panoramaImage.d.ts +10 -1
- package/dist/src/panorama/panoramaImage.js +9 -4
- package/dist/src/panorama/panoramaImage.js.map +1 -1
- package/dist/src/panorama/panoramaImageView.d.ts +6 -1
- package/dist/src/panorama/panoramaImageView.js +11 -2
- package/dist/src/panorama/panoramaImageView.js.map +1 -1
- package/dist/src/panorama/panoramaTileMaterial.d.ts +6 -0
- package/dist/src/panorama/panoramaTileMaterial.js +14 -0
- package/dist/src/panorama/panoramaTileMaterial.js.map +1 -1
- package/dist/src/panorama/panoramaTileMaterialFS.shader.d.ts +1 -1
- package/dist/src/panorama/panoramaTileMaterialFS.shader.js +16 -1
- package/dist/src/panorama/panoramaTileMaterialFS.shader.js.map +1 -1
- package/dist/src/panorama/panoramaTilePrimitiveCollection.d.ts +6 -0
- package/dist/src/panorama/panoramaTilePrimitiveCollection.js +28 -0
- package/dist/src/panorama/panoramaTilePrimitiveCollection.js.map +1 -1
- package/dist/src/util/clipping/clippingPolygonObject.d.ts +1 -1
- package/dist/src/util/clipping/clippingPolygonObject.js +3 -4
- package/dist/src/util/clipping/clippingPolygonObject.js.map +1 -1
- package/dist/src/util/displayQuality/displayQuality.js +4 -4
- package/dist/src/util/displayQuality/displayQuality.js.map +1 -1
- package/dist/src/util/editor/createFeatureSession.js +3 -1
- package/dist/src/util/editor/createFeatureSession.js.map +1 -1
- package/dist/src/util/editor/editFeaturesSession.js +9 -2
- package/dist/src/util/editor/editFeaturesSession.js.map +1 -1
- package/dist/src/util/editor/editGeometrySession.js +3 -1
- package/dist/src/util/editor/editGeometrySession.js.map +1 -1
- package/dist/src/util/editor/editorSessionHelpers.d.ts +3 -3
- package/dist/src/util/editor/editorSessionHelpers.js +4 -2
- package/dist/src/util/editor/editorSessionHelpers.js.map +1 -1
- package/dist/src/util/editor/interactions/creationSnapping.js +4 -1
- package/dist/src/util/editor/interactions/creationSnapping.js.map +1 -1
- package/dist/src/util/editor/interactions/ensureHandlerSelectionInteraction.js +2 -2
- package/dist/src/util/editor/interactions/ensureHandlerSelectionInteraction.js.map +1 -1
- package/dist/src/util/editor/interactions/layerSnapping.js +4 -1
- package/dist/src/util/editor/interactions/layerSnapping.js.map +1 -1
- package/dist/src/util/editor/interactions/mapInteractionController.js +12 -1
- package/dist/src/util/editor/interactions/mapInteractionController.js.map +1 -1
- package/dist/src/util/editor/interactions/translationSnapping.js +4 -2
- package/dist/src/util/editor/interactions/translationSnapping.js.map +1 -1
- package/dist/src/util/editor/selectFeaturesSession.js +1 -1
- package/dist/src/util/editor/selectFeaturesSession.js.map +1 -1
- package/dist/src/util/editor/transformation/create3DHandlers.d.ts +2 -2
- package/dist/src/util/editor/transformation/create3DHandlers.js.map +1 -1
- package/dist/src/util/editor/transformation/transformationHandler.js +5 -2
- package/dist/src/util/editor/transformation/transformationHandler.js.map +1 -1
- package/dist/src/util/editor/transformation/translateInteraction.js +2 -2
- package/dist/src/util/editor/transformation/translateInteraction.js.map +1 -1
- package/dist/src/util/flight/flightInstance.d.ts +1 -1
- package/dist/src/util/flight/flightInstance.js +3 -4
- package/dist/src/util/flight/flightInstance.js.map +1 -1
- package/dist/src/util/mapCollection.d.ts +5 -0
- package/dist/src/util/mapCollection.js +14 -0
- package/dist/src/util/mapCollection.js.map +1 -1
- package/dist/src/util/renderScreenshot.js +2 -3
- package/dist/src/util/renderScreenshot.js.map +1 -1
- package/dist/src/util/viewpoint.js +1 -1
- package/dist/src/util/viewpoint.js.map +1 -1
- package/dist/src/vcsObject.d.ts +2 -1
- package/dist/src/vcsObject.js +9 -1
- package/dist/src/vcsObject.js.map +1 -1
- package/dist/src/vectorCluster/vectorClusterGroup.d.ts +1 -1
- package/dist/src/vectorCluster/vectorClusterGroup.js +3 -4
- package/dist/src/vectorCluster/vectorClusterGroup.js.map +1 -1
- package/dist/src/vectorCluster/vectorClusterStyleItem.d.ts +1 -1
- package/dist/src/vectorCluster/vectorClusterStyleItem.js +3 -4
- package/dist/src/vectorCluster/vectorClusterStyleItem.js.map +1 -1
- package/dist/tests/unit/helpers/cesiumHelpers.d.ts +11 -1
- package/dist/tests/unit/helpers/cesiumHelpers.js +19 -2
- package/dist/tests/unit/helpers/cesiumHelpers.js.map +1 -1
- package/dist/tests/unit/helpers/panoramaHelpers.js +1 -1
- package/dist/tests/unit/helpers/panoramaHelpers.js.map +1 -1
- package/index.ts +3 -5
- package/package.json +2 -2
- package/src/category/category.ts +3 -4
- package/src/featureProvider/abstractFeatureProvider.ts +5 -4
- package/src/featureProvider/wmsFeatureProvider.ts +8 -4
- package/src/interaction/coordinateAtPixel.ts +4 -6
- package/src/interaction/ensurePositionInteraction.ts +50 -0
- package/src/interaction/eventHandler.ts +12 -1
- package/src/interaction/featureAtPixelInteraction.ts +39 -29
- package/src/interaction/panoramaImageSelection.ts +4 -2
- package/src/layer/cesium/cesiumTilesetCesiumImpl.ts +3 -3
- package/src/layer/cesium/rasterLayerCesiumImpl.ts +3 -3
- package/src/layer/cesium/terrainCesiumImpl.ts +3 -3
- package/src/layer/cesium/vectorContext.ts +1 -1
- package/src/layer/cesiumTilesetLayer.ts +9 -7
- package/src/layer/cogLayer.ts +5 -5
- package/src/layer/czmlLayer.ts +4 -4
- package/src/layer/featureLayer.ts +5 -16
- package/src/layer/featureStoreLayer.ts +11 -5
- package/src/layer/flatGeobufLayer.ts +12 -0
- package/src/layer/geojsonLayer.ts +5 -12
- package/src/layer/layer.ts +148 -36
- package/src/layer/openStreetMapLayer.ts +13 -6
- package/src/layer/panorama/vectorPanoramaImpl.ts +238 -0
- package/src/layer/panoramaDatasetLayer.ts +25 -10
- package/src/layer/pointCloudLayer.ts +5 -20
- package/src/layer/rasterLayer.ts +4 -4
- package/src/layer/singleImageLayer.ts +5 -3
- package/src/layer/terrainLayer.ts +9 -6
- package/src/layer/tileProvider/flatGeobufTileProvider.ts +6 -3
- package/src/layer/tileProvider/mvtTileProvider.ts +7 -3
- package/src/layer/tileProvider/staticFeatureTileProvider.ts +5 -3
- package/src/layer/tileProvider/staticGeojsonTileProvider.ts +11 -4
- package/src/layer/tileProvider/tileProvider.ts +5 -4
- package/src/layer/tileProvider/urlTemplateTileProvider.ts +7 -3
- package/src/layer/tmsLayer.ts +3 -10
- package/src/layer/vectorLayer.ts +25 -9
- package/src/layer/vectorTileLayer.ts +6 -6
- package/src/layer/wfsLayer.ts +7 -4
- package/src/layer/wmsLayer.ts +3 -4
- package/src/layer/wmtsLayer.ts +3 -10
- package/src/map/baseCesiumMap.ts +576 -0
- package/src/map/cesiumMap.ts +103 -446
- package/src/map/obliqueMap.ts +3 -4
- package/src/map/openlayersMap.ts +5 -5
- package/src/map/panoramaMap.ts +74 -139
- package/src/map/vcsMap.ts +44 -4
- package/src/oblique/obliqueCollection.ts +5 -4
- package/src/panorama/panoramaCameraController.ts +13 -1
- package/src/panorama/panoramaImage.ts +17 -3
- package/src/panorama/panoramaImageView.ts +29 -3
- package/src/panorama/panoramaTileMaterial.ts +20 -0
- package/src/panorama/panoramaTileMaterialFS.glsl +16 -1
- package/src/panorama/panoramaTilePrimitiveCollection.ts +34 -0
- package/src/util/clipping/clippingPolygonObject.ts +5 -4
- package/src/util/displayQuality/displayQuality.ts +4 -4
- package/src/util/editor/createFeatureSession.ts +4 -1
- package/src/util/editor/editFeaturesSession.ts +14 -4
- package/src/util/editor/editGeometrySession.ts +3 -1
- package/src/util/editor/editorSessionHelpers.ts +5 -3
- package/src/util/editor/interactions/creationSnapping.ts +7 -1
- package/src/util/editor/interactions/ensureHandlerSelectionInteraction.ts +2 -2
- package/src/util/editor/interactions/layerSnapping.ts +7 -1
- package/src/util/editor/interactions/mapInteractionController.ts +12 -2
- package/src/util/editor/interactions/translationSnapping.ts +6 -4
- package/src/util/editor/selectFeaturesSession.ts +1 -1
- package/src/util/editor/transformation/create3DHandlers.ts +2 -2
- package/src/util/editor/transformation/transformationHandler.ts +5 -3
- package/src/util/editor/transformation/translateInteraction.ts +4 -4
- package/src/util/flight/flightInstance.ts +6 -5
- package/src/util/mapCollection.ts +18 -0
- package/src/util/renderScreenshot.ts +4 -8
- package/src/util/viewpoint.ts +2 -2
- package/src/vcsObject.ts +10 -1
- package/src/vectorCluster/vectorClusterGroup.ts +7 -4
- package/src/vectorCluster/vectorClusterStyleItem.ts +8 -4
- package/dist/src/map/cesiumMapHelpers.d.ts +0 -7
- package/dist/src/map/cesiumMapHelpers.js +0 -144
- package/dist/src/map/cesiumMapHelpers.js.map +0 -1
- package/src/map/cesiumMapHelpers.ts +0 -219
|
@@ -13,8 +13,10 @@ export default class PanoramaImageSelection extends AbstractInteraction {
|
|
|
13
13
|
|
|
14
14
|
override async pipe(event: InteractionEvent): Promise<InteractionEvent> {
|
|
15
15
|
if (event.feature && (event.feature as Feature)[panoramaFeature]) {
|
|
16
|
-
const { dataset, name } = (event.feature as Feature)[
|
|
17
|
-
|
|
16
|
+
const { dataset, name, time } = (event.feature as Feature)[
|
|
17
|
+
panoramaFeature
|
|
18
|
+
]!;
|
|
19
|
+
const panoramaImage = await dataset.createPanoramaImage(name, time);
|
|
18
20
|
event.stopPropagation = true;
|
|
19
21
|
|
|
20
22
|
if (event.map instanceof PanoramaMap) {
|
|
@@ -33,11 +33,11 @@ import type {
|
|
|
33
33
|
CesiumTilesetImplementationOptions,
|
|
34
34
|
CesiumTilesetTilesetProperties,
|
|
35
35
|
} from '../cesiumTilesetLayer.js';
|
|
36
|
-
import type CesiumMap from '../../map/cesiumMap.js';
|
|
37
36
|
import type { FeatureLayerImplementation } from '../featureLayer.js';
|
|
38
37
|
import type StyleItem from '../../style/styleItem.js';
|
|
39
38
|
import type GlobalHider from '../globalHider.js';
|
|
40
39
|
import { getResourceOrUrl } from './resourceHelper.js';
|
|
40
|
+
import type BaseCesiumMap from '../../map/baseCesiumMap.js';
|
|
41
41
|
|
|
42
42
|
export const cesiumTilesetLastUpdated: unique symbol = Symbol(
|
|
43
43
|
'cesiumTilesetLastUpdated',
|
|
@@ -84,7 +84,7 @@ export function getExtentFromTileset(
|
|
|
84
84
|
* represents the cesium implementation for a {@link CesiumTilesetLayer} layer.
|
|
85
85
|
*/
|
|
86
86
|
class CesiumTilesetCesiumImpl
|
|
87
|
-
extends LayerImplementation<
|
|
87
|
+
extends LayerImplementation<BaseCesiumMap>
|
|
88
88
|
implements FeatureLayerImplementation
|
|
89
89
|
{
|
|
90
90
|
static get className(): string {
|
|
@@ -121,7 +121,7 @@ class CesiumTilesetCesiumImpl
|
|
|
121
121
|
|
|
122
122
|
private _customShader: CustomShader | undefined;
|
|
123
123
|
|
|
124
|
-
constructor(map:
|
|
124
|
+
constructor(map: BaseCesiumMap, options: CesiumTilesetImplementationOptions) {
|
|
125
125
|
super(map, options);
|
|
126
126
|
|
|
127
127
|
this.cesium3DTileset = null;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import type { ImageryLayer, SplitDirection } from '@vcmap-cesium/engine';
|
|
2
2
|
import { vcsLayerName } from '../layerSymbols.js';
|
|
3
3
|
import LayerImplementation from '../layerImplementation.js';
|
|
4
|
-
import type CesiumMap from '../../map/cesiumMap.js';
|
|
5
4
|
import type {
|
|
6
5
|
RasterLayerImplementation,
|
|
7
6
|
RasterLayerImplementationOptions,
|
|
8
7
|
TilingScheme,
|
|
9
8
|
} from '../rasterLayer.js';
|
|
10
9
|
import type Extent from '../../util/extent.js';
|
|
10
|
+
import type BaseCesiumMap from '../../map/baseCesiumMap.js';
|
|
11
11
|
|
|
12
12
|
class RasterLayerCesiumImpl
|
|
13
|
-
extends LayerImplementation<
|
|
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:
|
|
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<
|
|
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:
|
|
22
|
+
constructor(map: BaseCesiumMap, options: TerrainImplementationOptions) {
|
|
23
23
|
super(map, options);
|
|
24
24
|
|
|
25
25
|
this.requestVertexNormals = options.requestVertexNormals;
|
|
@@ -31,7 +31,7 @@ import {
|
|
|
31
31
|
scaleSymbol,
|
|
32
32
|
} from '../vectorSymbols.js';
|
|
33
33
|
import type PanoramaMap from '../../map/panoramaMap.js';
|
|
34
|
-
import { getResolution } from '../../map/
|
|
34
|
+
import { getResolution } from '../../map/baseCesiumMap.js';
|
|
35
35
|
|
|
36
36
|
export function setReferenceForPicking(
|
|
37
37
|
feature: Feature,
|
|
@@ -23,6 +23,8 @@ import type { LayerOptions } from './layer.js';
|
|
|
23
23
|
import type FeatureVisibility from './featureVisibility.js';
|
|
24
24
|
import type VcsMap from '../map/vcsMap.js';
|
|
25
25
|
import { cesiumColorToColor, getStringColor } from '../style/styleHelpers.js';
|
|
26
|
+
import PanoramaMap from '../map/panoramaMap.js';
|
|
27
|
+
import BaseCesiumMap from '../map/baseCesiumMap.js';
|
|
26
28
|
|
|
27
29
|
export type CesiumTilesetOptions = LayerOptions & {
|
|
28
30
|
/**
|
|
@@ -94,14 +96,13 @@ class CesiumTilesetLayer extends FeatureLayer<CesiumTilesetCesiumImpl> {
|
|
|
94
96
|
|
|
95
97
|
private _offset: Coordinate | undefined;
|
|
96
98
|
|
|
97
|
-
protected _supportedMaps = [CesiumMap.className];
|
|
99
|
+
protected _supportedMaps = [CesiumMap.className, PanoramaMap.className];
|
|
98
100
|
|
|
99
101
|
private _customShader: CustomShader | undefined = undefined;
|
|
100
102
|
|
|
101
103
|
constructor(options: CesiumTilesetOptions) {
|
|
102
|
-
super(options);
|
|
103
|
-
this._supportedMaps = [CesiumMap.className];
|
|
104
104
|
const defaultOptions = CesiumTilesetLayer.getDefaultOptions();
|
|
105
|
+
super({ ...defaultOptions, ...options });
|
|
105
106
|
|
|
106
107
|
this.highlightStyle = null;
|
|
107
108
|
if (options.highlightStyle) {
|
|
@@ -199,7 +200,7 @@ class CesiumTilesetLayer extends FeatureLayer<CesiumTilesetCesiumImpl> {
|
|
|
199
200
|
}
|
|
200
201
|
|
|
201
202
|
createImplementationsForMap(map: VcsMap): CesiumTilesetCesiumImpl[] {
|
|
202
|
-
if (map instanceof
|
|
203
|
+
if (map instanceof BaseCesiumMap) {
|
|
203
204
|
return [
|
|
204
205
|
new CesiumTilesetCesiumImpl(map, this.getImplementationOptions()),
|
|
205
206
|
];
|
|
@@ -244,9 +245,10 @@ class CesiumTilesetLayer extends FeatureLayer<CesiumTilesetCesiumImpl> {
|
|
|
244
245
|
});
|
|
245
246
|
}
|
|
246
247
|
|
|
247
|
-
toJSON(
|
|
248
|
-
|
|
249
|
-
|
|
248
|
+
toJSON(
|
|
249
|
+
defaultOptions = CesiumTilesetLayer.getDefaultOptions(),
|
|
250
|
+
): CesiumTilesetOptions {
|
|
251
|
+
const config: CesiumTilesetOptions = super.toJSON(defaultOptions);
|
|
250
252
|
if (this.highlightStyle) {
|
|
251
253
|
config.highlightStyle = this.highlightStyle.toJSON();
|
|
252
254
|
}
|
package/src/layer/cogLayer.ts
CHANGED
|
@@ -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
|
-
|
|
138
|
-
|
|
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) {
|
package/src/layer/czmlLayer.ts
CHANGED
|
@@ -49,10 +49,10 @@ class CzmlLayer extends DataSourceLayer {
|
|
|
49
49
|
* @param options
|
|
50
50
|
*/
|
|
51
51
|
constructor(options: CzmlOptions) {
|
|
52
|
-
|
|
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(
|
|
205
|
-
|
|
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
|
-
|
|
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
|
|
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(
|
|
592
|
-
|
|
593
|
-
|
|
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
|
|
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
|
-
|
|
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();
|