@vcmap/core 5.0.0-rc.3 → 5.0.0-rc.31
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/LICENSE.md +1 -1
- package/README.md +12 -5
- package/build/postinstall.js +14 -3
- package/index.d.ts +3480 -2008
- package/index.js +169 -131
- package/package.json +25 -27
- package/src/category/category.js +483 -0
- package/src/category/categoryCollection.js +153 -0
- package/src/cesium/cesium3DTileFeature.js +2 -2
- package/src/cesium/cesium3DTilePointFeature.js +1 -1
- package/src/cesium/cesiumVcsCameraPrimitive.js +16 -8
- package/src/cesium/entity.js +29 -0
- package/src/cesium/wallpaperMaterial.js +5 -3
- package/src/classRegistry.js +169 -0
- package/src/{vcs/vcm/util/featureProvider → featureProvider}/abstractFeatureProvider.js +49 -46
- package/src/{vcs/vcm/util/featureProvider → featureProvider}/tileProviderFeatureProvider.js +13 -5
- package/src/{vcs/vcm/util/featureProvider → featureProvider}/wmsFeatureProvider.js +56 -26
- package/src/{vcs/vcm/interaction → interaction}/abstractInteraction.js +33 -21
- package/src/{vcs/vcm/interaction → interaction}/coordinateAtPixel.js +40 -21
- package/src/{vcs/vcm/interaction → interaction}/eventHandler.js +131 -26
- package/src/{vcs/vcm/interaction → interaction}/featureAtPixelInteraction.js +108 -53
- package/src/interaction/featureProviderInteraction.js +58 -0
- package/src/{vcs/vcm/interaction → interaction}/interactionChain.js +40 -41
- package/src/{vcs/vcm/interaction → interaction}/interactionType.js +24 -31
- package/src/{vcs/vcm/layer/cesium/cesiumTilesetCesium.js → layer/cesium/cesiumTilesetCesiumImpl.js} +83 -70
- package/src/{vcs/vcm/layer → layer}/cesium/clusterContext.js +33 -8
- package/src/{vcs/vcm/layer/cesium/dataSourceCesium.js → layer/cesium/dataSourceCesiumImpl.js} +24 -13
- package/src/layer/cesium/openStreetMapCesiumImpl.js +32 -0
- package/src/{vcs/vcm/layer/cesium/rasterLayerCesium.js → layer/cesium/rasterLayerCesiumImpl.js} +12 -9
- package/src/{vcs/vcm/layer/cesium/singleImageCesium.js → layer/cesium/singleImageCesiumImpl.js} +19 -9
- package/src/{vcs/vcm/layer/cesium/terrainCesium.js → layer/cesium/terrainCesiumImpl.js} +8 -9
- package/src/{vcs/vcm/layer/cesium/tmsCesium.js → layer/cesium/tmsCesiumImpl.js} +21 -10
- package/src/{vcs/vcm/layer/cesium/vectorCesium.js → layer/cesium/vectorCesiumImpl.js} +93 -35
- package/src/layer/cesium/vectorContext.js +363 -0
- package/src/{vcs/vcm/layer/cesium/vectorRasterTileCesium.js → layer/cesium/vectorRasterTileCesiumImpl.js} +21 -13
- package/src/{vcs/vcm/layer → layer}/cesium/vectorTileImageryProvider.js +58 -21
- package/src/{vcs/vcm/layer/cesium/wmsCesium.js → layer/cesium/wmsCesiumImpl.js} +20 -9
- package/src/{vcs/vcm/layer/cesium/wmtsCesium.js → layer/cesium/wmtsCesiumImpl.js} +24 -13
- package/src/{vcs/vcm/layer → layer}/cesium/x3dmHelper.js +6 -3
- package/src/{vcs/vcm/layer/cesiumTileset.js → layer/cesiumTilesetLayer.js} +71 -112
- package/src/{vcs/vcm/layer/czml.js → layer/czmlLayer.js} +23 -20
- package/src/{vcs/vcm/layer/dataSource.js → layer/dataSourceLayer.js} +55 -90
- package/src/{vcs/vcm/layer → layer}/featureLayer.js +89 -74
- package/src/{vcs/vcm/layer/featureStore.js → layer/featureStoreLayer.js} +197 -150
- package/src/{vcs/vcm/layer/featureStoreChanges.js → layer/featureStoreLayerChanges.js} +150 -92
- package/src/{vcs/vcm/layer/featureStoreState.js → layer/featureStoreLayerState.js} +1 -2
- package/src/{vcs/vcm/layer → layer}/featureVisibility.js +114 -82
- package/src/{vcs/vcm/layer → layer}/geojsonHelpers.js +84 -69
- package/src/{vcs/vcm/layer/geojson.js → layer/geojsonLayer.js} +30 -27
- package/src/{vcs/vcm/layer → layer}/globalHider.js +25 -39
- package/src/{vcs/vcm/layer → layer}/layer.js +171 -96
- package/src/{vcs/vcm/layer → layer}/layerImplementation.js +13 -6
- package/src/{vcs/vcm/layer → layer}/layerState.js +0 -1
- package/src/{vcs/vcm/layer → layer}/layerSymbols.js +2 -1
- package/src/{vcs/vcm/layer/oblique/layerOblique.js → layer/oblique/layerObliqueImpl.js} +7 -5
- package/src/{vcs/vcm/layer → layer}/oblique/obliqueHelpers.js +76 -31
- package/src/{vcs/vcm/layer/oblique/vectorOblique.js → layer/oblique/vectorObliqueImpl.js} +198 -80
- package/src/{vcs/vcm/layer/openStreetMap.js → layer/openStreetMapLayer.js} +59 -40
- package/src/layer/openlayers/layerOpenlayersImpl.js +165 -0
- package/src/layer/openlayers/openStreetMapOpenlayersImpl.js +28 -0
- package/src/layer/openlayers/rasterLayerOpenlayersImpl.js +44 -0
- package/src/{vcs/vcm/layer/openlayers/singleImageOpenlayers.js → layer/openlayers/singleImageOpenlayersImpl.js} +8 -7
- package/src/{vcs/vcm/layer/openlayers/tileDebugOpenlayers.js → layer/openlayers/tileDebugOpenlayersImpl.js} +7 -6
- package/src/{vcs/vcm/layer/openlayers/tmsOpenlayers.js → layer/openlayers/tmsOpenlayersImpl.js} +12 -10
- package/src/{vcs/vcm/layer/openlayers/vectorOpenlayers.js → layer/openlayers/vectorOpenlayersImpl.js} +21 -12
- package/src/{vcs/vcm/layer/openlayers/vectorTileOpenlayers.js → layer/openlayers/vectorTileOpenlayersImpl.js} +18 -12
- package/src/{vcs/vcm/layer/openlayers/wmsOpenlayers.js → layer/openlayers/wmsOpenlayersImpl.js} +9 -8
- package/src/{vcs/vcm/layer/openlayers/wmtsOpenlayers.js → layer/openlayers/wmtsOpenlayersImpl.js} +19 -12
- package/src/{vcs/vcm/layer/pointCloud.js → layer/pointCloudLayer.js} +42 -39
- package/src/{vcs/vcm/layer → layer}/rasterLayer.js +86 -37
- package/src/{vcs/vcm/layer/singleImage.js → layer/singleImageLayer.js} +25 -22
- package/src/layer/terrainHelpers.js +95 -0
- package/src/{vcs/vcm/layer/terrain.js → layer/terrainLayer.js} +28 -21
- package/src/{vcs/vcm/layer → layer}/tileLoadedHelper.js +13 -8
- package/src/{vcs/vcm/layer → layer}/tileProvider/mvtTileProvider.js +51 -8
- package/src/layer/tileProvider/staticGeojsonTileProvider.js +87 -0
- package/src/{vcs/vcm/layer → layer}/tileProvider/tileProvider.js +200 -89
- package/src/{vcs/vcm/layer → layer}/tileProvider/urlTemplateTileProvider.js +54 -13
- package/src/{vcs/vcm/layer/tms.js → layer/tmsLayer.js} +22 -22
- package/src/layer/vectorHelpers.js +129 -0
- package/src/{vcs/vcm/layer/vector.js → layer/vectorLayer.js} +124 -94
- package/src/{vcs/vcm/layer → layer}/vectorProperties.js +419 -107
- package/src/{vcs/vcm/layer → layer}/vectorSymbols.js +11 -1
- package/src/{vcs/vcm/layer/vectorTile.js → layer/vectorTileLayer.js} +181 -116
- package/src/{vcs/vcm/layer/wfs.js → layer/wfsLayer.js} +33 -23
- package/src/{vcs/vcm/layer → layer}/wmsHelpers.js +14 -7
- package/src/{vcs/vcm/layer/wms.js → layer/wmsLayer.js} +53 -32
- package/src/{vcs/vcm/layer/wmts.js → layer/wmtsLayer.js} +56 -42
- package/src/{vcs/vcm/maps → map}/baseOLMap.js +83 -35
- package/src/{vcs/vcm/maps → map}/cameraLimiter.js +64 -37
- package/src/{vcs/vcm/maps/cesium.js → map/cesiumMap.js} +431 -277
- package/src/{vcs/vcm/maps → map}/mapState.js +0 -1
- package/src/{vcs/vcm/maps/oblique.js → map/obliqueMap.js} +132 -97
- package/src/{vcs/vcm/maps/openlayers.js → map/openlayersMap.js} +69 -45
- package/src/{vcs/vcm/maps/map.js → map/vcsMap.js} +118 -46
- package/src/oblique/defaultObliqueCollection.js +62 -0
- package/src/{vcs/vcm/oblique → oblique}/helpers.js +221 -78
- package/src/{vcs/vcm/oblique/ObliqueCollection.js → oblique/obliqueCollection.js} +151 -55
- package/src/{vcs/vcm/oblique/ObliqueDataSet.js → oblique/obliqueDataSet.js} +77 -46
- package/src/{vcs/vcm/oblique/ObliqueImage.js → oblique/obliqueImage.js} +58 -26
- package/src/{vcs/vcm/oblique/ObliqueImageMeta.js → oblique/obliqueImageMeta.js} +9 -9
- package/src/{vcs/vcm/oblique/ObliqueProvider.js → oblique/obliqueProvider.js} +85 -35
- package/src/{vcs/vcm/oblique/ObliqueView.js → oblique/obliqueView.js} +45 -5
- package/src/{vcs/vcm/oblique/ObliqueViewDirection.js → oblique/obliqueViewDirection.js} +3 -5
- package/src/{vcs/vcm/oblique → oblique}/parseImageJson.js +62 -28
- package/src/ol/feature.js +34 -1
- package/src/ol/geom/circle.js +14 -5
- package/src/ol/geom/geometryCollection.js +14 -8
- package/src/ol/render/canvas/canvasTileRenderer.js +11 -10
- package/src/overrideClassRegistry.js +214 -0
- package/src/style/arcStyle.js +453 -0
- package/src/style/arrowStyle.js +304 -0
- package/src/{vcs/vcm/util/style → style}/declarativeStyleItem.js +147 -82
- package/src/{vcs/vcm/util/style → style}/shapesCategory.js +8 -8
- package/src/style/styleFactory.js +32 -0
- package/src/{vcs/vcm/util/style → style}/styleHelpers.js +24 -26
- package/src/style/styleItem.js +174 -0
- package/src/{vcs/vcm/util/style → style}/vectorStyleItem.js +230 -156
- package/src/{vcs/vcm/util/style → style}/writeStyle.js +7 -12
- package/src/{vcs/vcm/util → util}/clipping/clippingObject.js +79 -49
- package/src/{vcs/vcm/util → util}/clipping/clippingObjectManager.js +56 -23
- package/src/{vcs/vcm/util → util}/clipping/clippingPlaneHelper.js +149 -88
- package/src/{vcs/vcm/util → util}/collection.js +28 -10
- package/src/util/editor/createFeatureSession.js +195 -0
- package/src/util/editor/editFeaturesSession.js +325 -0
- package/src/util/editor/editGeometrySession.js +452 -0
- package/src/util/editor/editorHelpers.js +300 -0
- package/src/util/editor/editorSessionHelpers.js +132 -0
- package/src/util/editor/editorSymbols.js +21 -0
- package/src/util/editor/interactions/createBBoxInteraction.js +154 -0
- package/src/util/editor/interactions/createCircleInteraction.js +119 -0
- package/src/util/editor/interactions/createLineStringInteraction.js +119 -0
- package/src/util/editor/interactions/createPointInteraction.js +73 -0
- package/src/util/editor/interactions/createPolygonInteraction.js +136 -0
- package/src/util/editor/interactions/editFeaturesMouseOverInteraction.js +88 -0
- package/src/util/editor/interactions/editGeometryMouseOverInteraction.js +119 -0
- package/src/util/editor/interactions/ensureHandlerSelectionInteraction.js +50 -0
- package/src/util/editor/interactions/insertVertexInteraction.js +103 -0
- package/src/util/editor/interactions/mapInteractionController.js +119 -0
- package/src/util/editor/interactions/removeVertexInteraction.js +42 -0
- package/src/util/editor/interactions/selectFeatureMouseOverInteraction.js +152 -0
- package/src/util/editor/interactions/selectMultiFeatureInteraction.js +165 -0
- package/src/util/editor/interactions/selectSingleFeatureInteraction.js +120 -0
- package/src/util/editor/interactions/translateVertexInteraction.js +60 -0
- package/src/util/editor/selectFeaturesSession.js +303 -0
- package/src/util/editor/transformation/create2DHandlers.js +339 -0
- package/src/util/editor/transformation/create3DHandlers.js +678 -0
- package/src/util/editor/transformation/extrudeInteraction.js +106 -0
- package/src/util/editor/transformation/rotateInteraction.js +201 -0
- package/src/util/editor/transformation/scaleInteraction.js +201 -0
- package/src/util/editor/transformation/transformationHandler.js +178 -0
- package/src/util/editor/transformation/transformationTypes.js +88 -0
- package/src/util/editor/transformation/translateInteraction.js +263 -0
- package/src/util/editor/validateGeoemetry.js +24 -0
- package/src/{vcs/vcm/util → util}/exclusiveManager.js +6 -3
- package/src/{vcs/vcm/util → util}/extent.js +26 -20
- package/src/util/featureconverter/arcToCesium.js +121 -0
- package/src/{vcs/vcm/util → util}/featureconverter/circleToCesium.js +70 -37
- package/src/{vcs/vcm/util → util}/featureconverter/convert.js +94 -16
- package/src/util/featureconverter/extent3D.js +284 -0
- package/src/{vcs/vcm/util → util}/featureconverter/featureconverterHelper.js +253 -94
- package/src/util/featureconverter/lineStringToCesium.js +343 -0
- package/src/util/featureconverter/pointHelpers.js +413 -0
- package/src/{vcs/vcm/util → util}/featureconverter/pointToCesium.js +157 -107
- package/src/{vcs/vcm/util → util}/featureconverter/polygonToCesium.js +57 -24
- package/src/util/fetch.js +34 -0
- package/src/{vcs/vcm/util → util}/geometryHelpers.js +25 -17
- package/src/{vcs/vcm/util → util}/indexedCollection.js +27 -8
- package/src/{vcs/vcm/util → util}/isMobile.js +8 -2
- package/src/{vcs/vcm/util → util}/layerCollection.js +109 -19
- package/src/util/locale.js +12 -0
- package/src/{vcs/vcm/util → util}/mapCollection.js +170 -63
- package/src/util/math.js +193 -0
- package/src/util/overrideCollection.js +261 -0
- package/src/{vcs/vcm/util → util}/projection.js +23 -31
- package/src/{vcs/vcm/util → util}/urlHelpers.js +5 -3
- package/src/{vcs/vcm/util → util}/viewpoint.js +83 -57
- package/src/vcsApp.js +657 -0
- package/src/{vcs/vcm/event/vcsEvent.js → vcsEvent.js} +2 -3
- package/src/vcsModule.js +130 -0
- package/src/vcsModuleHelpers.js +136 -0
- package/src/{vcs/vcm/object.js → vcsObject.js} +3 -10
- package/tests/data/dynamicPointCzml.json +53 -0
- package/tests/data/oblique/imageData/imagev34.json +136 -0
- package/tests/data/oblique/imageData/imagev35.json +307 -0
- package/tests/data/oblique/imageData/imagev35PerImageSize.json +333 -0
- package/tests/data/oblique/tiledImageData/12/2199/1342.json +11056 -0
- package/tests/data/oblique/tiledImageData/12/2199/1343.json +11236 -0
- package/tests/data/oblique/tiledImageData/12/2199/1344.json +11077 -0
- package/tests/data/oblique/tiledImageData/12/2200/1342.json +11036 -0
- package/tests/data/oblique/tiledImageData/12/2200/1343.json +11277 -0
- package/tests/data/oblique/tiledImageData/12/2200/1344.json +11131 -0
- package/tests/data/oblique/tiledImageData/12/2201/1342.json +10870 -0
- package/tests/data/oblique/tiledImageData/12/2201/1343.json +11492 -0
- package/tests/data/oblique/tiledImageData/12/2201/1344.json +10909 -0
- package/tests/data/oblique/tiledImageData/image.json +70 -0
- package/tests/data/terrain/13/8800/6485.terrain +0 -0
- package/tests/data/terrain/13/8800/6486.terrain +0 -0
- package/tests/data/terrain/13/8801/6485.terrain +0 -0
- package/tests/data/terrain/13/8801/6486.terrain +0 -0
- package/tests/data/terrain/layer.json +127 -0
- package/tests/data/testGeoJSON.json +149 -0
- package/tests/data/tile.pbf +0 -0
- package/tests/unit/helpers/cesiumHelpers.js +326 -0
- package/tests/unit/helpers/getFileNameFromUrl.js +12 -0
- package/tests/unit/helpers/helpers.js +32 -0
- package/tests/unit/helpers/imageHelpers.js +24 -0
- package/tests/unit/helpers/importJSON.js +15 -0
- package/tests/unit/helpers/obliqueData.js +102 -0
- package/tests/unit/helpers/obliqueHelpers.js +115 -0
- package/tests/unit/helpers/openlayersHelpers.js +25 -0
- package/tests/unit/helpers/terrain/terrainData.js +45 -0
- package/src/vcs/vcm/classRegistry.js +0 -106
- package/src/vcs/vcm/globalCollections.js +0 -11
- package/src/vcs/vcm/interaction/featureProviderInteraction.js +0 -54
- package/src/vcs/vcm/layer/buildings.js +0 -17
- package/src/vcs/vcm/layer/cesium/openStreetMapCesium.js +0 -29
- package/src/vcs/vcm/layer/cesium/pointCloudCesium.js +0 -58
- package/src/vcs/vcm/layer/cesium/vectorContext.js +0 -167
- package/src/vcs/vcm/layer/openlayers/layerOpenlayers.js +0 -79
- package/src/vcs/vcm/layer/openlayers/openStreetMapOpenlayers.js +0 -27
- package/src/vcs/vcm/layer/openlayers/rasterLayerOpenlayers.js +0 -121
- package/src/vcs/vcm/layer/terrainHelpers.js +0 -119
- package/src/vcs/vcm/layer/tileProvider/staticGeojsonTileProvider.js +0 -67
- package/src/vcs/vcm/layer/tileProvider/tileProviderFactory.js +0 -28
- package/src/vcs/vcm/layer/vectorHelpers.js +0 -206
- package/src/vcs/vcm/util/dateTime.js +0 -60
- package/src/vcs/vcm/util/featureProvider/featureProviderHelpers.js +0 -51
- package/src/vcs/vcm/util/featureconverter/extent3d.js +0 -154
- package/src/vcs/vcm/util/featureconverter/lineStringToCesium.js +0 -171
- package/src/vcs/vcm/util/locale.js +0 -53
- package/src/vcs/vcm/util/math.js +0 -71
- package/src/vcs/vcm/util/splitScreen.js +0 -233
- package/src/vcs/vcm/util/style/styleFactory.js +0 -48
- package/src/vcs/vcm/util/style/styleItem.js +0 -243
- /package/src/{vcs/vcm/util/featureProvider → featureProvider}/featureProviderSymbols.js +0 -0
|
@@ -1,34 +1,46 @@
|
|
|
1
|
-
import axios from 'axios';
|
|
2
1
|
import Feature from 'ol/Feature.js';
|
|
3
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
Cesium3DTileFeature,
|
|
4
|
+
Cesium3DTilePointFeature,
|
|
5
|
+
SplitDirection,
|
|
6
|
+
} from '@vcmap-cesium/engine';
|
|
4
7
|
import VectorSource from 'ol/source/Vector.js';
|
|
5
8
|
import { createEmpty, extend as extendExtent } from 'ol/extent.js';
|
|
6
9
|
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
10
|
+
import VectorLayer from './vectorLayer.js';
|
|
11
|
+
import {
|
|
12
|
+
featureStoreStateSymbol,
|
|
13
|
+
FeatureStoreLayerState,
|
|
14
|
+
} from './featureStoreLayerState.js';
|
|
9
15
|
import { parseGeoJSON } from './geojsonHelpers.js';
|
|
10
16
|
import { mercatorProjection } from '../util/projection.js';
|
|
11
|
-
import
|
|
12
|
-
import VectorStyleItem, {
|
|
17
|
+
import FeatureStoreLayerChanges from './featureStoreLayerChanges.js';
|
|
18
|
+
import VectorStyleItem, {
|
|
19
|
+
defaultVectorStyle,
|
|
20
|
+
vectorStyleSymbol,
|
|
21
|
+
} from '../style/vectorStyleItem.js';
|
|
13
22
|
import FeatureVisibility, {
|
|
14
23
|
FeatureVisibilityAction,
|
|
15
24
|
originalStyle,
|
|
16
25
|
synchronizeFeatureVisibility,
|
|
17
26
|
updateOriginalStyle,
|
|
18
27
|
} from './featureVisibility.js';
|
|
19
|
-
import
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
import
|
|
23
|
-
import
|
|
28
|
+
import CesiumTilesetCesiumImpl, {
|
|
29
|
+
getExtentFromTileset,
|
|
30
|
+
} from './cesium/cesiumTilesetCesiumImpl.js';
|
|
31
|
+
import CesiumMap from '../map/cesiumMap.js';
|
|
32
|
+
import OpenlayersMap from '../map/openlayersMap.js';
|
|
33
|
+
import ObliqueMap from '../map/obliqueMap.js';
|
|
34
|
+
import CesiumTilesetLayer from './cesiumTilesetLayer.js';
|
|
24
35
|
import VectorProperties from './vectorProperties.js';
|
|
25
|
-
import
|
|
36
|
+
import VectorOpenlayersImpl from './openlayers/vectorOpenlayersImpl.js';
|
|
26
37
|
import Layer from './layer.js';
|
|
27
|
-
import DeclarativeStyleItem from '../
|
|
28
|
-
import
|
|
38
|
+
import DeclarativeStyleItem from '../style/declarativeStyleItem.js';
|
|
39
|
+
import VectorObliqueImpl from './oblique/vectorObliqueImpl.js';
|
|
29
40
|
import Extent from '../util/extent.js';
|
|
30
41
|
import { isMobile } from '../util/isMobile.js';
|
|
31
|
-
import {
|
|
42
|
+
import { layerClassRegistry } from '../classRegistry.js';
|
|
43
|
+
import { requestJson } from '../util/fetch.js';
|
|
32
44
|
|
|
33
45
|
/**
|
|
34
46
|
* @typedef {Object} FeatureStoreStaticRepresentation
|
|
@@ -43,7 +55,7 @@ import { VcsClassRegistry } from '../classRegistry.js';
|
|
|
43
55
|
* @property {Object} properties - the properties bag
|
|
44
56
|
* @property {Object} geometry
|
|
45
57
|
* @property {Object|undefined} vcsMeta
|
|
46
|
-
* @property {
|
|
58
|
+
* @property {FeatureStoreLayerState} state
|
|
47
59
|
* @property {string} type - the featureType
|
|
48
60
|
* @todo write vcsMeta for features
|
|
49
61
|
* @todo set type to be one of an enum
|
|
@@ -66,7 +78,7 @@ import { VcsClassRegistry } from '../classRegistry.js';
|
|
|
66
78
|
|
|
67
79
|
/**
|
|
68
80
|
* @typedef {FeatureStoreLayerSchema} FeatureStoreOptions
|
|
69
|
-
* @property {Function|undefined} injectedFetchDynamicFeatureFunc - injected function for fetching dynamic features from a remote
|
|
81
|
+
* @property {Function|undefined} injectedFetchDynamicFeatureFunc - injected function for fetching dynamic features from a remote FeatureStoreLayer server
|
|
70
82
|
* @api
|
|
71
83
|
*/
|
|
72
84
|
|
|
@@ -74,14 +86,15 @@ import { VcsClassRegistry } from '../classRegistry.js';
|
|
|
74
86
|
export const isTiledFeature = Symbol('isTiledFeature');
|
|
75
87
|
|
|
76
88
|
/**
|
|
77
|
-
*
|
|
89
|
+
* FeatureStoreLayer Layer
|
|
78
90
|
* @class
|
|
79
|
-
* @
|
|
80
|
-
* @extends {Vector}
|
|
91
|
+
* @extends {VectorLayer}
|
|
81
92
|
* @api
|
|
82
93
|
*/
|
|
83
|
-
class
|
|
84
|
-
static get className() {
|
|
94
|
+
class FeatureStoreLayer extends VectorLayer {
|
|
95
|
+
static get className() {
|
|
96
|
+
return 'FeatureStoreLayer';
|
|
97
|
+
}
|
|
85
98
|
|
|
86
99
|
/**
|
|
87
100
|
* @returns {FeatureStoreOptions}
|
|
@@ -89,10 +102,10 @@ class FeatureStore extends Vector {
|
|
|
89
102
|
static getDefaultOptions() {
|
|
90
103
|
return {
|
|
91
104
|
id: '',
|
|
92
|
-
type: '
|
|
105
|
+
type: 'FeatureStoreLayer',
|
|
93
106
|
featureType: 'simple',
|
|
94
107
|
features: [],
|
|
95
|
-
...
|
|
108
|
+
...VectorLayer.getDefaultOptions(),
|
|
96
109
|
projection: mercatorProjection.toJSON(),
|
|
97
110
|
staticRepresentation: {},
|
|
98
111
|
hiddenStaticFeatureIds: [],
|
|
@@ -108,7 +121,7 @@ class FeatureStore extends Vector {
|
|
|
108
121
|
* @param {FeatureStoreOptions} options
|
|
109
122
|
*/
|
|
110
123
|
constructor(options) {
|
|
111
|
-
const defaultOptions =
|
|
124
|
+
const defaultOptions = FeatureStoreLayer.getDefaultOptions();
|
|
112
125
|
const vectorOptions = {
|
|
113
126
|
projection: defaultOptions.projection,
|
|
114
127
|
...options,
|
|
@@ -116,8 +129,8 @@ class FeatureStore extends Vector {
|
|
|
116
129
|
super(vectorOptions);
|
|
117
130
|
this._supportedMaps = [
|
|
118
131
|
CesiumMap.className,
|
|
119
|
-
|
|
120
|
-
|
|
132
|
+
OpenlayersMap.className,
|
|
133
|
+
ObliqueMap.className,
|
|
121
134
|
];
|
|
122
135
|
|
|
123
136
|
/**
|
|
@@ -130,16 +143,19 @@ class FeatureStore extends Vector {
|
|
|
130
143
|
this.layerId = options.id;
|
|
131
144
|
|
|
132
145
|
/** @type {FeatureStoreStaticRepresentation} */
|
|
133
|
-
this.staticRepresentation =
|
|
146
|
+
this.staticRepresentation =
|
|
147
|
+
options.staticRepresentation || defaultOptions.staticRepresentation;
|
|
134
148
|
|
|
135
149
|
/** @type {Set<string|number>} */
|
|
136
|
-
this.hiddenStaticFeatureIds = new Set(
|
|
150
|
+
this.hiddenStaticFeatureIds = new Set(
|
|
151
|
+
options.hiddenStaticFeatureIds || defaultOptions.hiddenStaticFeatureIds,
|
|
152
|
+
);
|
|
137
153
|
|
|
138
154
|
/**
|
|
139
|
-
* @type {
|
|
155
|
+
* @type {FeatureStoreLayerChanges}
|
|
140
156
|
* @api
|
|
141
157
|
*/
|
|
142
|
-
this.changeTracker = new
|
|
158
|
+
this.changeTracker = new FeatureStoreLayerChanges(this);
|
|
143
159
|
|
|
144
160
|
const { vcsMeta } = defaultOptions;
|
|
145
161
|
if (options.vcsMeta) {
|
|
@@ -156,12 +172,13 @@ class FeatureStore extends Vector {
|
|
|
156
172
|
this.screenSpaceError = this.vcsMeta.screenSpaceError;
|
|
157
173
|
|
|
158
174
|
/**
|
|
159
|
-
* @type {import("@vcmap/
|
|
175
|
+
* @type {import("@vcmap-cesium/engine").Event.RemoveCallback}
|
|
160
176
|
* @private
|
|
161
177
|
*/
|
|
162
|
-
this._removeVectorPropertiesChangeHandler =
|
|
163
|
-
this.
|
|
164
|
-
|
|
178
|
+
this._removeVectorPropertiesChangeHandler =
|
|
179
|
+
this.vectorProperties.propertyChanged.addEventListener(() => {
|
|
180
|
+
this.changeTracker.values.changed = true;
|
|
181
|
+
});
|
|
165
182
|
|
|
166
183
|
/**
|
|
167
184
|
* a function to retrieve a single feature from the server
|
|
@@ -169,7 +186,8 @@ class FeatureStore extends Vector {
|
|
|
169
186
|
* @returns {Promise<string|Object>}
|
|
170
187
|
* @api
|
|
171
188
|
*/
|
|
172
|
-
this.injectedFetchDynamicFeatureFunc =
|
|
189
|
+
this.injectedFetchDynamicFeatureFunc =
|
|
190
|
+
options.injectedFetchDynamicFeatureFunc;
|
|
173
191
|
/**
|
|
174
192
|
* @type {FeatureVisibility}
|
|
175
193
|
* @private
|
|
@@ -181,10 +199,15 @@ class FeatureStore extends Vector {
|
|
|
181
199
|
* @private
|
|
182
200
|
*/
|
|
183
201
|
this._featureVisibilitySyncListeners = [
|
|
184
|
-
synchronizeFeatureVisibility(
|
|
202
|
+
synchronizeFeatureVisibility(
|
|
203
|
+
this.featureVisibility,
|
|
204
|
+
this._staticFeatureVisibility,
|
|
205
|
+
),
|
|
185
206
|
this._staticFeatureVisibility.changed.addEventListener(({ action }) => {
|
|
186
207
|
if (action === FeatureVisibilityAction.SHOW) {
|
|
187
|
-
this._staticFeatureVisibility.hideObjects([
|
|
208
|
+
this._staticFeatureVisibility.hideObjects([
|
|
209
|
+
...this.hiddenStaticFeatureIds,
|
|
210
|
+
]);
|
|
188
211
|
}
|
|
189
212
|
}),
|
|
190
213
|
];
|
|
@@ -216,10 +239,10 @@ class FeatureStore extends Vector {
|
|
|
216
239
|
features: options.features,
|
|
217
240
|
vcsMeta: options.vcsMeta,
|
|
218
241
|
};
|
|
219
|
-
const { style, features } = parseGeoJSON(
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
);
|
|
242
|
+
const { style, features } = parseGeoJSON(featureCollection, {
|
|
243
|
+
targetProjection: mercatorProjection,
|
|
244
|
+
dynamicStyle: true,
|
|
245
|
+
});
|
|
223
246
|
if (style) {
|
|
224
247
|
this._defaultStyle = style;
|
|
225
248
|
this.setStyle(style);
|
|
@@ -234,10 +257,11 @@ class FeatureStore extends Vector {
|
|
|
234
257
|
*/
|
|
235
258
|
initialize() {
|
|
236
259
|
if (!this.initialized) {
|
|
237
|
-
return super.initialize()
|
|
238
|
-
.
|
|
239
|
-
|
|
240
|
-
|
|
260
|
+
return super.initialize().then(() => {
|
|
261
|
+
this._staticFeatureVisibility.hideObjects([
|
|
262
|
+
...this.hiddenStaticFeatureIds,
|
|
263
|
+
]);
|
|
264
|
+
});
|
|
241
265
|
}
|
|
242
266
|
return super.initialize();
|
|
243
267
|
}
|
|
@@ -249,25 +273,26 @@ class FeatureStore extends Vector {
|
|
|
249
273
|
_loadTwoDim() {
|
|
250
274
|
if (!this._twoDimLoaded) {
|
|
251
275
|
this._twoDimLoaded = (async () => {
|
|
252
|
-
const
|
|
276
|
+
const data = await requestJson(this.staticRepresentation.twoDim);
|
|
253
277
|
const { features } = parseGeoJSON(data, {
|
|
254
278
|
targetProjection: mercatorProjection,
|
|
255
279
|
dynamicStyle: true,
|
|
256
280
|
});
|
|
257
281
|
const isDeclarative = this.style instanceof DeclarativeStyleItem;
|
|
258
|
-
features
|
|
259
|
-
.
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
});
|
|
282
|
+
features.forEach((feature) => {
|
|
283
|
+
feature[Layer.vcsLayerNameSymbol] = this.name;
|
|
284
|
+
feature[isTiledFeature] = true;
|
|
285
|
+
if (isDeclarative && feature[vectorStyleSymbol]) {
|
|
286
|
+
feature.setStyle();
|
|
287
|
+
}
|
|
288
|
+
if (this._setEditing && this._setEditing.featureType != null) {
|
|
289
|
+
feature[this._setEditing.symbol] = this._setEditing.featureType;
|
|
290
|
+
}
|
|
291
|
+
});
|
|
269
292
|
this._twoDimStaticSource.addFeatures(
|
|
270
|
-
/** @type {Array<import("ol").Feature<import("ol/geom/Geometry").default>>} */ (
|
|
293
|
+
/** @type {Array<import("ol").Feature<import("ol/geom/Geometry").default>>} */ (
|
|
294
|
+
features
|
|
295
|
+
),
|
|
271
296
|
);
|
|
272
297
|
})();
|
|
273
298
|
}
|
|
@@ -288,41 +313,60 @@ class FeatureStore extends Vector {
|
|
|
288
313
|
|
|
289
314
|
/**
|
|
290
315
|
* @param {import("@vcmap/core").VcsMap} map
|
|
291
|
-
* @returns {Array<
|
|
316
|
+
* @returns {Array<VectorObliqueImpl|import("@vcmap/core").VectorCesiumImpl|VectorOpenlayersImpl|CesiumTilesetCesiumImpl>}
|
|
292
317
|
*/
|
|
293
318
|
// @ts-ignore
|
|
294
319
|
createImplementationsForMap(map) {
|
|
295
|
-
const impls =
|
|
320
|
+
const impls =
|
|
321
|
+
/** @type {Array<import("@vcmap/core").LayerImplementation>} */
|
|
296
322
|
(super.createImplementationsForMap(map));
|
|
297
|
-
if (
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
{
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
323
|
+
if (
|
|
324
|
+
map instanceof CesiumMap &&
|
|
325
|
+
this.staticRepresentation &&
|
|
326
|
+
this.staticRepresentation.threeDim
|
|
327
|
+
) {
|
|
328
|
+
impls.push(
|
|
329
|
+
new CesiumTilesetCesiumImpl(
|
|
330
|
+
map,
|
|
331
|
+
/** @type {CesiumTilesetImplementationOptions} */ ({
|
|
332
|
+
url: this.staticRepresentation.threeDim,
|
|
333
|
+
tilesetOptions: {
|
|
334
|
+
maximumScreenSpaceError: isMobile()
|
|
335
|
+
? this.screenSpaceErrorMobile
|
|
336
|
+
: this.screenSpaceError,
|
|
337
|
+
url: this.staticRepresentation.threeDim,
|
|
338
|
+
},
|
|
339
|
+
tilesetProperties: [
|
|
340
|
+
{
|
|
341
|
+
key: isTiledFeature,
|
|
342
|
+
value: true,
|
|
343
|
+
},
|
|
344
|
+
],
|
|
345
|
+
name: this.name,
|
|
346
|
+
style: this.style,
|
|
347
|
+
featureVisibility: this._staticFeatureVisibility,
|
|
348
|
+
globalHider: this.globalHider,
|
|
349
|
+
splitDirection: SplitDirection.NONE,
|
|
350
|
+
jumpToLocation: false,
|
|
351
|
+
}),
|
|
352
|
+
),
|
|
353
|
+
);
|
|
316
354
|
} else if (this.staticRepresentation && this.staticRepresentation.twoDim) {
|
|
317
355
|
this._loadTwoDim();
|
|
318
|
-
if (map instanceof
|
|
319
|
-
impls.push(
|
|
320
|
-
|
|
321
|
-
|
|
356
|
+
if (map instanceof OpenlayersMap) {
|
|
357
|
+
impls.push(
|
|
358
|
+
new VectorOpenlayersImpl(map, this._getTwoDimStaticImplOptions()),
|
|
359
|
+
);
|
|
360
|
+
} else if (map instanceof ObliqueMap) {
|
|
361
|
+
impls.push(
|
|
362
|
+
new VectorObliqueImpl(map, this._getTwoDimStaticImplOptions()),
|
|
363
|
+
);
|
|
322
364
|
}
|
|
323
365
|
}
|
|
324
366
|
// eslint-disable-next-line max-len
|
|
325
|
-
return /** @type {Array<
|
|
367
|
+
return /** @type {Array<VectorObliqueImpl|import("@vcmap/core").VectorCesiumImpl|VectorOpenlayersImpl|CesiumTilesetCesiumImpl>} */ (
|
|
368
|
+
impls
|
|
369
|
+
);
|
|
326
370
|
}
|
|
327
371
|
|
|
328
372
|
/**
|
|
@@ -359,19 +403,21 @@ class FeatureStore extends Vector {
|
|
|
359
403
|
}
|
|
360
404
|
|
|
361
405
|
const isDeclarative = this.style instanceof DeclarativeStyleItem;
|
|
362
|
-
this._twoDimStyleChanged = this.style.styleChanged.addEventListener(
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
f
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
406
|
+
this._twoDimStyleChanged = this.style.styleChanged.addEventListener(
|
|
407
|
+
() => {
|
|
408
|
+
this._twoDimStaticSource.getFeatures().forEach((f) => {
|
|
409
|
+
if (isDeclarative || !f[vectorStyleSymbol]) {
|
|
410
|
+
f.changed();
|
|
411
|
+
}
|
|
412
|
+
});
|
|
413
|
+
},
|
|
414
|
+
);
|
|
369
415
|
}
|
|
370
416
|
}
|
|
371
417
|
|
|
372
418
|
/**
|
|
373
419
|
* @inheritDoc
|
|
374
|
-
* @param {
|
|
420
|
+
* @param {import("ol/style/Style").default|import("ol/style/Style").StyleFunction|import("@vcmap/core").StyleItem} style
|
|
375
421
|
* @param {boolean=} silent
|
|
376
422
|
* @api
|
|
377
423
|
*/
|
|
@@ -409,7 +455,7 @@ class FeatureStore extends Vector {
|
|
|
409
455
|
*/
|
|
410
456
|
setEditing(symbol, featureType) {
|
|
411
457
|
this.getImplementations().forEach((impl) => {
|
|
412
|
-
if (impl instanceof
|
|
458
|
+
if (impl instanceof CesiumTilesetCesiumImpl) {
|
|
413
459
|
if (impl.initialized) {
|
|
414
460
|
if (featureType != null) {
|
|
415
461
|
impl.cesium3DTileset[symbol] = featureType;
|
|
@@ -426,14 +472,13 @@ class FeatureStore extends Vector {
|
|
|
426
472
|
if (this.staticRepresentation.twoDim) {
|
|
427
473
|
if (this._twoDimLoaded) {
|
|
428
474
|
this._twoDimLoaded.then(() => {
|
|
429
|
-
this._twoDimStaticSource.getFeatures()
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
});
|
|
475
|
+
this._twoDimStaticSource.getFeatures().forEach((f) => {
|
|
476
|
+
if (featureType != null) {
|
|
477
|
+
f[symbol] = featureType;
|
|
478
|
+
} else {
|
|
479
|
+
delete f[symbol];
|
|
480
|
+
}
|
|
481
|
+
});
|
|
437
482
|
});
|
|
438
483
|
} else {
|
|
439
484
|
this._setEditing = { symbol, featureType };
|
|
@@ -442,33 +487,24 @@ class FeatureStore extends Vector {
|
|
|
442
487
|
}
|
|
443
488
|
|
|
444
489
|
/**
|
|
445
|
-
* @param {Object|import("ol").Feature<import("ol/geom/Geometry").default>|import("@vcmap/
|
|
490
|
+
* @param {Object|import("ol").Feature<import("ol/geom/Geometry").default>|import("@vcmap-cesium/engine").Cesium3DTilePointFeature|import("@vcmap-cesium/engine").Cesium3DTileFeature} feature
|
|
446
491
|
* @returns {?Object}
|
|
447
492
|
*/
|
|
448
493
|
objectClickedHandler(feature) {
|
|
449
|
-
if (
|
|
450
|
-
|
|
494
|
+
if (
|
|
495
|
+
feature instanceof Cesium3DTileFeature ||
|
|
496
|
+
feature instanceof Cesium3DTilePointFeature
|
|
497
|
+
) {
|
|
498
|
+
return CesiumTilesetLayer.prototype.objectClickedHandler.call(
|
|
499
|
+
this,
|
|
500
|
+
feature,
|
|
501
|
+
);
|
|
451
502
|
} else if (feature instanceof Feature) {
|
|
452
503
|
return super.objectClickedHandler(feature);
|
|
453
504
|
}
|
|
454
505
|
return null;
|
|
455
506
|
}
|
|
456
507
|
|
|
457
|
-
/**
|
|
458
|
-
* @param {Object|VectorClickedObject} object
|
|
459
|
-
* @returns {GenericFeature}
|
|
460
|
-
*/
|
|
461
|
-
getGenericFeatureFromClickedObject(object) {
|
|
462
|
-
if (object instanceof Feature) {
|
|
463
|
-
// @ts-ignore
|
|
464
|
-
return super.getGenericFeatureFromClickedObject(/** @type {VectorClickedObject} */ (object));
|
|
465
|
-
}
|
|
466
|
-
const generic = CesiumTileset.prototype.getGenericFeatureFromClickedObject.call(this, object);
|
|
467
|
-
generic.layerName = this.name;
|
|
468
|
-
generic.layerClass = this.className;
|
|
469
|
-
return generic;
|
|
470
|
-
}
|
|
471
|
-
|
|
472
508
|
/**
|
|
473
509
|
* @inheritDoc
|
|
474
510
|
* @returns {Extent|null}
|
|
@@ -479,12 +515,17 @@ class FeatureStore extends Vector {
|
|
|
479
515
|
return this.extent;
|
|
480
516
|
}
|
|
481
517
|
const extent = super.getZoomToExtent();
|
|
482
|
-
const mercatorExtent = extent
|
|
518
|
+
const mercatorExtent = extent
|
|
519
|
+
? extent.getCoordinatesInProjection(mercatorProjection)
|
|
520
|
+
: createEmpty();
|
|
483
521
|
if (this.staticRepresentation.threeDim) {
|
|
484
|
-
const threeDImpl = /** @type {
|
|
485
|
-
.find((impl) => {
|
|
486
|
-
return
|
|
487
|
-
|
|
522
|
+
const threeDImpl = /** @type {CesiumTilesetCesiumImpl} */ (
|
|
523
|
+
this.getImplementations().find((impl) => {
|
|
524
|
+
return (
|
|
525
|
+
impl instanceof CesiumTilesetCesiumImpl && impl.cesium3DTileset
|
|
526
|
+
);
|
|
527
|
+
})
|
|
528
|
+
);
|
|
488
529
|
|
|
489
530
|
if (threeDImpl) {
|
|
490
531
|
const threeDimExtent = getExtentFromTileset(threeDImpl.cesium3DTileset);
|
|
@@ -497,7 +538,7 @@ class FeatureStore extends Vector {
|
|
|
497
538
|
}
|
|
498
539
|
|
|
499
540
|
const actualExtent = new Extent({
|
|
500
|
-
|
|
541
|
+
projection: mercatorProjection.toJSON(),
|
|
501
542
|
coordinates: mercatorExtent,
|
|
502
543
|
});
|
|
503
544
|
|
|
@@ -520,17 +561,16 @@ class FeatureStore extends Vector {
|
|
|
520
561
|
this.screenSpaceError = value;
|
|
521
562
|
}
|
|
522
563
|
|
|
523
|
-
this.getImplementations()
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
});
|
|
564
|
+
this.getImplementations().forEach((impl) => {
|
|
565
|
+
if (impl instanceof CesiumTilesetCesiumImpl && impl.cesium3DTileset) {
|
|
566
|
+
impl.cesium3DTileset.maximumScreenSpaceError = value;
|
|
567
|
+
}
|
|
568
|
+
});
|
|
529
569
|
}
|
|
530
570
|
|
|
531
571
|
/**
|
|
532
572
|
* switch an array of static features to dynamic features
|
|
533
|
-
* This is done by hiding the static features and adding their dynamic counterparts to the
|
|
573
|
+
* This is done by hiding the static features and adding their dynamic counterparts to the FeatureStoreLayer layer
|
|
534
574
|
* @param {string|number} [featureId] input static feature ID
|
|
535
575
|
* @returns {Promise<import("ol").Feature<import("ol/geom/Geometry").default>>}
|
|
536
576
|
* @api
|
|
@@ -542,15 +582,13 @@ class FeatureStore extends Vector {
|
|
|
542
582
|
if (this.injectedFetchDynamicFeatureFunc) {
|
|
543
583
|
return this.injectedFetchDynamicFeatureFunc(featureId)
|
|
544
584
|
.then((result) => {
|
|
545
|
-
const { features } = parseGeoJSON(
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
},
|
|
553
|
-
);
|
|
585
|
+
const { features } = parseGeoJSON(result, {
|
|
586
|
+
targetProjection: mercatorProjection,
|
|
587
|
+
defaultStyle:
|
|
588
|
+
this.defaultStyle instanceof VectorStyleItem
|
|
589
|
+
? this.defaultStyle
|
|
590
|
+
: defaultVectorStyle,
|
|
591
|
+
});
|
|
554
592
|
this._staticFeatureVisibility.hideObjects([featureId]);
|
|
555
593
|
this.hiddenStaticFeatureIds.add(featureId);
|
|
556
594
|
this.addFeatures(features);
|
|
@@ -573,7 +611,7 @@ class FeatureStore extends Vector {
|
|
|
573
611
|
this.hiddenStaticFeatureIds.add(featureId);
|
|
574
612
|
const feature = new Feature();
|
|
575
613
|
feature.setId(featureId);
|
|
576
|
-
feature[featureStoreStateSymbol] =
|
|
614
|
+
feature[featureStoreStateSymbol] = FeatureStoreLayerState.STATIC;
|
|
577
615
|
this.changeTracker.removeFeature(feature);
|
|
578
616
|
}
|
|
579
617
|
|
|
@@ -598,16 +636,20 @@ class FeatureStore extends Vector {
|
|
|
598
636
|
*/
|
|
599
637
|
toJSON() {
|
|
600
638
|
const config = /** @type {FeatureStoreOptions} */ (super.toJSON());
|
|
601
|
-
const defaultOptions =
|
|
639
|
+
const defaultOptions = FeatureStoreLayer.getDefaultOptions();
|
|
602
640
|
|
|
603
641
|
delete config.projection;
|
|
604
|
-
config.vcsMeta = this.vectorProperties
|
|
605
|
-
|
|
642
|
+
config.vcsMeta = this.vectorProperties.getVcsMeta({
|
|
643
|
+
...VectorProperties.getDefaultOptions(),
|
|
644
|
+
...defaultOptions.vcsMeta,
|
|
645
|
+
});
|
|
606
646
|
if (Object.keys(config.vcsMeta).length === 0) {
|
|
607
647
|
delete config.vcsMeta;
|
|
608
648
|
}
|
|
609
649
|
|
|
610
|
-
if (
|
|
650
|
+
if (
|
|
651
|
+
this.vcsMeta.screenSpaceError !== defaultOptions.vcsMeta.screenSpaceError
|
|
652
|
+
) {
|
|
611
653
|
config.vcsMeta = config.vcsMeta || {};
|
|
612
654
|
config.vcsMeta.screenSpaceError = this.vcsMeta.screenSpaceError;
|
|
613
655
|
}
|
|
@@ -632,7 +674,9 @@ class FeatureStore extends Vector {
|
|
|
632
674
|
this._twoDimStyleChanged();
|
|
633
675
|
this._twoDimStyleChanged = null;
|
|
634
676
|
}
|
|
635
|
-
this._featureVisibilitySyncListeners.forEach((cb) => {
|
|
677
|
+
this._featureVisibilitySyncListeners.forEach((cb) => {
|
|
678
|
+
cb();
|
|
679
|
+
});
|
|
636
680
|
this._featureVisibilitySyncListeners = [];
|
|
637
681
|
this._staticFeatureVisibility.destroy();
|
|
638
682
|
this.changeTracker.destroy();
|
|
@@ -643,5 +687,8 @@ class FeatureStore extends Vector {
|
|
|
643
687
|
}
|
|
644
688
|
}
|
|
645
689
|
|
|
646
|
-
|
|
647
|
-
|
|
690
|
+
layerClassRegistry.registerClass(
|
|
691
|
+
FeatureStoreLayer.className,
|
|
692
|
+
FeatureStoreLayer,
|
|
693
|
+
);
|
|
694
|
+
export default FeatureStoreLayer;
|