@vcmap/core 5.0.0-rc.1 → 5.0.0-rc.12
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 +3 -2
- package/index.d.ts +2085 -1969
- package/index.js +137 -131
- package/package.json +14 -22
- package/src/category/appBackedCategory.js +76 -0
- package/src/category/category.js +417 -0
- package/src/category/categoryCollection.js +145 -0
- package/src/cesium/cesium3DTileFeature.js +1 -1
- package/src/classRegistry.js +162 -0
- package/src/context.js +72 -0
- package/src/{vcs/vcm/util/featureProvider → featureProvider}/abstractFeatureProvider.js +8 -9
- package/src/{vcs/vcm/util/featureProvider → featureProvider}/featureProviderHelpers.js +4 -5
- package/src/{vcs/vcm/util/featureProvider → featureProvider}/featureProviderSymbols.js +0 -0
- package/src/{vcs/vcm/util/featureProvider → featureProvider}/tileProviderFeatureProvider.js +4 -2
- package/src/{vcs/vcm/util/featureProvider → featureProvider}/wmsFeatureProvider.js +25 -18
- package/src/{vcs/vcm/interaction → interaction}/abstractInteraction.js +19 -18
- package/src/{vcs/vcm/interaction → interaction}/coordinateAtPixel.js +6 -9
- package/src/{vcs/vcm/interaction → interaction}/eventHandler.js +3 -3
- package/src/{vcs/vcm/interaction → interaction}/featureAtPixelInteraction.js +6 -19
- package/src/{vcs/vcm/interaction → interaction}/featureProviderInteraction.js +2 -13
- package/src/{vcs/vcm/interaction → interaction}/interactionChain.js +11 -32
- package/src/{vcs/vcm/interaction → interaction}/interactionType.js +1 -5
- package/src/{vcs/vcm/layer/cesium/cesiumTilesetCesium.js → layer/cesium/cesiumTilesetCesiumImpl.js} +10 -13
- package/src/{vcs/vcm/layer → layer}/cesium/clusterContext.js +0 -0
- package/src/{vcs/vcm/layer/cesium/dataSourceCesium.js → layer/cesium/dataSourceCesiumImpl.js} +5 -3
- package/src/{vcs/vcm/layer/cesium/openStreetMapCesium.js → layer/cesium/openStreetMapCesiumImpl.js} +6 -7
- package/src/{vcs/vcm/layer/cesium/rasterLayerCesium.js → layer/cesium/rasterLayerCesiumImpl.js} +5 -6
- package/src/{vcs/vcm/layer/cesium/singleImageCesium.js → layer/cesium/singleImageCesiumImpl.js} +5 -6
- package/src/{vcs/vcm/layer/cesium/terrainCesium.js → layer/cesium/terrainCesiumImpl.js} +4 -5
- package/src/{vcs/vcm/layer/cesium/tmsCesium.js → layer/cesium/tmsCesiumImpl.js} +6 -7
- package/src/{vcs/vcm/layer/cesium/vectorCesium.js → layer/cesium/vectorCesiumImpl.js} +6 -7
- package/src/{vcs/vcm/layer → layer}/cesium/vectorContext.js +0 -0
- package/src/{vcs/vcm/layer/cesium/vectorRasterTileCesium.js → layer/cesium/vectorRasterTileCesiumImpl.js} +5 -6
- package/src/{vcs/vcm/layer → layer}/cesium/vectorTileImageryProvider.js +1 -2
- package/src/{vcs/vcm/layer/cesium/wmsCesium.js → layer/cesium/wmsCesiumImpl.js} +6 -7
- package/src/{vcs/vcm/layer/cesium/wmtsCesium.js → layer/cesium/wmtsCesiumImpl.js} +6 -7
- package/src/{vcs/vcm/layer → layer}/cesium/x3dmHelper.js +0 -0
- package/src/{vcs/vcm/layer/cesiumTileset.js → layer/cesiumTilesetLayer.js} +38 -37
- package/src/{vcs/vcm/layer/czml.js → layer/czmlLayer.js} +14 -17
- package/src/{vcs/vcm/layer/dataSource.js → layer/dataSourceLayer.js} +38 -29
- package/src/{vcs/vcm/layer → layer}/featureLayer.js +27 -31
- package/src/{vcs/vcm/layer/featureStore.js → layer/featureStoreLayer.js} +54 -54
- package/src/{vcs/vcm/layer/featureStoreChanges.js → layer/featureStoreLayerChanges.js} +98 -82
- package/src/{vcs/vcm/layer/featureStoreState.js → layer/featureStoreLayerState.js} +1 -2
- package/src/{vcs/vcm/layer → layer}/featureVisibility.js +9 -6
- package/src/{vcs/vcm/layer → layer}/geojsonHelpers.js +15 -41
- package/src/{vcs/vcm/layer/geojson.js → layer/geojsonLayer.js} +19 -22
- package/src/{vcs/vcm/layer → layer}/globalHider.js +8 -32
- package/src/{vcs/vcm/layer → layer}/layer.js +63 -20
- package/src/{vcs/vcm/layer → layer}/layerImplementation.js +2 -3
- package/src/{vcs/vcm/layer → layer}/layerState.js +0 -1
- package/src/{vcs/vcm/layer → layer}/layerSymbols.js +0 -0
- package/src/{vcs/vcm/layer/oblique/layerOblique.js → layer/oblique/layerObliqueImpl.js} +4 -4
- package/src/{vcs/vcm/layer → layer}/oblique/obliqueHelpers.js +2 -2
- package/src/{vcs/vcm/layer/oblique/vectorOblique.js → layer/oblique/vectorObliqueImpl.js} +7 -9
- package/src/{vcs/vcm/layer/openStreetMap.js → layer/openStreetMapLayer.js} +32 -33
- package/src/{vcs/vcm/layer/openlayers/layerOpenlayers.js → layer/openlayers/layerOpenlayersImpl.js} +5 -6
- package/src/layer/openlayers/openStreetMapOpenlayersImpl.js +26 -0
- package/src/{vcs/vcm/layer/openlayers/rasterLayerOpenlayers.js → layer/openlayers/rasterLayerOpenlayersImpl.js} +15 -14
- package/src/{vcs/vcm/layer/openlayers/singleImageOpenlayers.js → layer/openlayers/singleImageOpenlayersImpl.js} +6 -7
- package/src/{vcs/vcm/layer/openlayers/tileDebugOpenlayers.js → layer/openlayers/tileDebugOpenlayersImpl.js} +5 -6
- package/src/{vcs/vcm/layer/openlayers/tmsOpenlayers.js → layer/openlayers/tmsOpenlayersImpl.js} +7 -8
- package/src/{vcs/vcm/layer/openlayers/vectorOpenlayers.js → layer/openlayers/vectorOpenlayersImpl.js} +8 -9
- package/src/{vcs/vcm/layer/openlayers/vectorTileOpenlayers.js → layer/openlayers/vectorTileOpenlayersImpl.js} +6 -7
- package/src/{vcs/vcm/layer/openlayers/wmsOpenlayers.js → layer/openlayers/wmsOpenlayersImpl.js} +7 -8
- package/src/{vcs/vcm/layer/openlayers/wmtsOpenlayers.js → layer/openlayers/wmtsOpenlayersImpl.js} +7 -8
- package/src/{vcs/vcm/layer/pointCloud.js → layer/pointCloudLayer.js} +26 -34
- package/src/{vcs/vcm/layer → layer}/rasterLayer.js +18 -20
- package/src/{vcs/vcm/layer/singleImage.js → layer/singleImageLayer.js} +20 -20
- package/src/{vcs/vcm/layer → layer}/terrainHelpers.js +13 -49
- package/src/{vcs/vcm/layer/terrain.js → layer/terrainLayer.js} +13 -14
- package/src/{vcs/vcm/layer → layer}/tileLoadedHelper.js +5 -5
- package/src/{vcs/vcm/layer → layer}/tileProvider/mvtTileProvider.js +22 -5
- package/src/layer/tileProvider/staticGeojsonTileProvider.js +81 -0
- package/src/{vcs/vcm/layer → layer}/tileProvider/tileProvider.js +16 -8
- package/src/{vcs/vcm/layer → layer}/tileProvider/urlTemplateTileProvider.js +20 -6
- package/src/{vcs/vcm/layer/tms.js → layer/tmsLayer.js} +19 -20
- package/src/{vcs/vcm/layer → layer}/vectorHelpers.js +5 -5
- package/src/{vcs/vcm/layer/vector.js → layer/vectorLayer.js} +38 -48
- package/src/{vcs/vcm/layer → layer}/vectorProperties.js +3 -4
- package/src/{vcs/vcm/layer → layer}/vectorSymbols.js +0 -0
- package/src/{vcs/vcm/layer/vectorTile.js → layer/vectorTileLayer.js} +55 -54
- package/src/{vcs/vcm/layer/wfs.js → layer/wfsLayer.js} +19 -20
- package/src/{vcs/vcm/layer → layer}/wmsHelpers.js +1 -1
- package/src/{vcs/vcm/layer/wms.js → layer/wmsLayer.js} +22 -23
- package/src/{vcs/vcm/layer/wmts.js → layer/wmtsLayer.js} +20 -21
- package/src/{vcs/vcm/maps → map}/baseOLMap.js +5 -6
- package/src/{vcs/vcm/maps → map}/cameraLimiter.js +11 -17
- package/src/{vcs/vcm/maps/cesium.js → map/cesiumMap.js} +21 -34
- package/src/{vcs/vcm/maps → map}/mapState.js +0 -1
- package/src/{vcs/vcm/maps/oblique.js → map/obliqueMap.js} +42 -57
- package/src/{vcs/vcm/maps/openlayers.js → map/openlayersMap.js} +17 -15
- package/src/{vcs/vcm/maps/map.js → map/vcsMap.js} +41 -22
- package/src/oblique/defaultObliqueCollection.js +62 -0
- package/src/{vcs/vcm/oblique → oblique}/helpers.js +13 -44
- package/src/{vcs/vcm/oblique/ObliqueCollection.js → oblique/obliqueCollection.js} +117 -37
- package/src/{vcs/vcm/oblique/ObliqueDataSet.js → oblique/obliqueDataSet.js} +67 -26
- package/src/{vcs/vcm/oblique/ObliqueImage.js → oblique/obliqueImage.js} +1 -2
- package/src/{vcs/vcm/oblique/ObliqueImageMeta.js → oblique/obliqueImageMeta.js} +4 -5
- package/src/{vcs/vcm/oblique/ObliqueProvider.js → oblique/obliqueProvider.js} +17 -12
- package/src/{vcs/vcm/oblique/ObliqueView.js → oblique/obliqueView.js} +31 -2
- package/src/{vcs/vcm/oblique/ObliqueViewDirection.js → oblique/obliqueViewDirection.js} +0 -3
- package/src/{vcs/vcm/oblique → oblique}/parseImageJson.js +20 -12
- package/src/ol/geom/circle.js +1 -1
- package/src/ol/render/canvas/canvasTileRenderer.js +0 -1
- package/src/overrideClassRegistry.js +204 -0
- package/src/{vcs/vcm/util/style → style}/declarativeStyleItem.js +43 -20
- package/src/{vcs/vcm/util/style → style}/shapesCategory.js +0 -2
- package/src/style/styleFactory.js +29 -0
- package/src/{vcs/vcm/util/style → style}/styleHelpers.js +3 -14
- package/src/{vcs/vcm/util/style → style}/styleItem.js +23 -86
- package/src/{vcs/vcm/util/style → style}/vectorStyleItem.js +73 -85
- package/src/{vcs/vcm/util/style → style}/writeStyle.js +4 -7
- package/src/{vcs/vcm/util → util}/clipping/clippingObject.js +10 -12
- package/src/{vcs/vcm/util → util}/clipping/clippingObjectManager.js +2 -3
- package/src/{vcs/vcm/util → util}/clipping/clippingPlaneHelper.js +4 -8
- package/src/{vcs/vcm/util → util}/collection.js +16 -4
- package/src/{vcs/vcm/util → util}/dateTime.js +0 -0
- package/src/{vcs/vcm/util → util}/exclusiveManager.js +0 -0
- package/src/{vcs/vcm/util → util}/extent.js +18 -12
- package/src/{vcs/vcm/util → util}/featureconverter/circleToCesium.js +0 -0
- package/src/{vcs/vcm/util → util}/featureconverter/convert.js +0 -0
- package/src/util/featureconverter/extent3D.js +181 -0
- package/src/{vcs/vcm/util → util}/featureconverter/featureconverterHelper.js +1 -1
- package/src/{vcs/vcm/util → util}/featureconverter/lineStringToCesium.js +0 -0
- package/src/{vcs/vcm/util → util}/featureconverter/pointToCesium.js +3 -3
- package/src/{vcs/vcm/util → util}/featureconverter/polygonToCesium.js +1 -1
- package/src/util/fetch.js +32 -0
- package/src/{vcs/vcm/util → util}/geometryHelpers.js +0 -0
- package/src/{vcs/vcm/util → util}/indexedCollection.js +24 -2
- package/src/{vcs/vcm/util → util}/isMobile.js +0 -0
- package/src/{vcs/vcm/util → util}/layerCollection.js +49 -12
- package/src/{vcs/vcm/util → util}/locale.js +1 -1
- package/src/{vcs/vcm/util → util}/mapCollection.js +91 -34
- package/src/{vcs/vcm/util → util}/math.js +0 -0
- package/src/util/overrideCollection.js +223 -0
- package/src/{vcs/vcm/util → util}/projection.js +39 -29
- package/src/{vcs/vcm/util → util}/splitScreen.js +10 -10
- package/src/{vcs/vcm/util → util}/urlHelpers.js +0 -0
- package/src/{vcs/vcm/util → util}/viewpoint.js +5 -9
- package/src/vcsApp.js +471 -0
- package/src/vcsAppContextHelpers.js +121 -0
- package/src/{vcs/vcm/event/vcsEvent.js → vcsEvent.js} +2 -3
- package/src/{vcs/vcm/object.js → vcsObject.js} +2 -10
- package/tests/data/buildings/tileset.json +428 -0
- package/tests/data/dynamicPointCzml.json +64 -0
- package/tests/data/oblique/imageData/imagev34.json +352 -0
- package/tests/data/oblique/imageData/imagev35.json +54 -0
- package/tests/data/oblique/imageData/imagev35PerImageSize.json +53 -0
- package/tests/data/oblique/tiledImageData/12/2199/1342.json +1 -0
- package/tests/data/oblique/tiledImageData/12/2199/1343.json +1 -0
- package/tests/data/oblique/tiledImageData/12/2199/1344.json +1 -0
- package/tests/data/oblique/tiledImageData/12/2200/1342.json +1 -0
- package/tests/data/oblique/tiledImageData/12/2200/1343.json +1 -0
- package/tests/data/oblique/tiledImageData/12/2200/1344.json +1 -0
- package/tests/data/oblique/tiledImageData/12/2201/1342.json +1 -0
- package/tests/data/oblique/tiledImageData/12/2201/1343.json +1 -0
- package/tests/data/oblique/tiledImageData/12/2201/1344.json +1 -0
- package/tests/data/oblique/tiledImageData/image.json +1 -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 +136 -0
- package/tests/data/testGeoJSON.json +161 -0
- package/tests/data/tile.pbf +0 -0
- package/tests/unit/helpers/cesiumHelpers.js +272 -0
- package/tests/unit/helpers/getFileNameFromUrl.js +12 -0
- package/tests/unit/helpers/helpers.js +11 -0
- package/tests/unit/helpers/imageHelpers.js +20 -0
- package/tests/unit/helpers/importJSON.js +15 -0
- package/tests/unit/helpers/obliqueData.js +76 -0
- package/tests/unit/helpers/obliqueHelpers.js +112 -0
- package/tests/unit/helpers/openlayersHelpers.js +22 -0
- package/tests/unit/helpers/terrain/terrainData.js +46 -0
- package/src/vcs/vcm/classRegistry.js +0 -106
- package/src/vcs/vcm/globalCollections.js +0 -11
- package/src/vcs/vcm/layer/buildings.js +0 -17
- package/src/vcs/vcm/layer/cesium/pointCloudCesium.js +0 -58
- package/src/vcs/vcm/layer/openlayers/openStreetMapOpenlayers.js +0 -27
- package/src/vcs/vcm/layer/tileProvider/staticGeojsonTileProvider.js +0 -67
- package/src/vcs/vcm/layer/tileProvider/tileProviderFactory.js +0 -28
- package/src/vcs/vcm/util/featureconverter/extent3d.js +0 -154
- package/src/vcs/vcm/util/style/styleFactory.js +0 -48
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
import { is, check } from '@vcsuite/check';
|
|
2
|
+
import { getLogger } from '@vcsuite/logger';
|
|
3
|
+
import OverrideClassRegistry from './overrideClassRegistry.js';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @returns {import("@vcsuite/logger").Logger}
|
|
7
|
+
*/
|
|
8
|
+
function logger() {
|
|
9
|
+
return getLogger('ClassRegistry');
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* @class
|
|
14
|
+
* @api
|
|
15
|
+
* @template {Object|import("@vcmap/core").VcsObject} T
|
|
16
|
+
*/
|
|
17
|
+
class ClassRegistry {
|
|
18
|
+
constructor() {
|
|
19
|
+
/**
|
|
20
|
+
* @type {Map<string, function(new: T, ...*)>}
|
|
21
|
+
* @private
|
|
22
|
+
*/
|
|
23
|
+
this._classMap = new Map();
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* @returns {Array<string>}
|
|
28
|
+
*/
|
|
29
|
+
getClassNames() {
|
|
30
|
+
return [...this._classMap.keys()];
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Register a class by its class name.
|
|
35
|
+
* @param {string} className
|
|
36
|
+
* @param {function(new: T, ...*)} ctor
|
|
37
|
+
* @api
|
|
38
|
+
*/
|
|
39
|
+
registerClass(className, ctor) {
|
|
40
|
+
check(className, String);
|
|
41
|
+
check(ctor, Function);
|
|
42
|
+
|
|
43
|
+
if (this._classMap.has(className)) {
|
|
44
|
+
throw new Error('a constructor with this className has already been registered');
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
this._classMap.set(className, ctor);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Gets the constructor for a registered class or undefined, if no such class was registerd
|
|
52
|
+
* @param {string} className
|
|
53
|
+
* @returns {function(new: T, ...*)|undefined}
|
|
54
|
+
* @api
|
|
55
|
+
*/
|
|
56
|
+
getClass(className) {
|
|
57
|
+
check(className, String);
|
|
58
|
+
|
|
59
|
+
if (this._classMap.has(className)) {
|
|
60
|
+
return this._classMap.get(className);
|
|
61
|
+
}
|
|
62
|
+
return undefined;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* @param {string} className
|
|
67
|
+
* @returns {boolean}
|
|
68
|
+
*/
|
|
69
|
+
hasClass(className) {
|
|
70
|
+
check(className, String);
|
|
71
|
+
|
|
72
|
+
return this._classMap.has(className);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* @param {string} className
|
|
77
|
+
* @param {...*} args
|
|
78
|
+
* @returns {T}
|
|
79
|
+
* @api
|
|
80
|
+
*/
|
|
81
|
+
create(className, ...args) {
|
|
82
|
+
check(className, String);
|
|
83
|
+
|
|
84
|
+
const Ctor = this.getClass(className);
|
|
85
|
+
if (!Ctor) {
|
|
86
|
+
logger().error(`could not find constructor ${className}`);
|
|
87
|
+
return undefined;
|
|
88
|
+
}
|
|
89
|
+
return new Ctor(...args);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* @param {Object} options
|
|
94
|
+
* @param {...*} args
|
|
95
|
+
* @returns {T}
|
|
96
|
+
*/
|
|
97
|
+
createFromTypeOptions(options, ...args) {
|
|
98
|
+
check(options, { type: String });
|
|
99
|
+
|
|
100
|
+
return this.create(options.type, options, ...args);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export default ClassRegistry;
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* @type {ClassRegistry<import("@vcmap/core").Layer>}
|
|
108
|
+
*/
|
|
109
|
+
export const layerClassRegistry = new ClassRegistry();
|
|
110
|
+
/**
|
|
111
|
+
* @type {ClassRegistry<import("@vcmap/core").TileProvider>}
|
|
112
|
+
*/
|
|
113
|
+
export const tileProviderClassRegistry = new ClassRegistry();
|
|
114
|
+
/**
|
|
115
|
+
* @type {ClassRegistry<import("@vcmap/core").AbstractFeatureProvider>}
|
|
116
|
+
*/
|
|
117
|
+
export const featureProviderClassRegistry = new ClassRegistry();
|
|
118
|
+
/**
|
|
119
|
+
* @type {ClassRegistry<import("@vcmap/core").VcsMap>}
|
|
120
|
+
*/
|
|
121
|
+
export const mapClassRegistry = new ClassRegistry();
|
|
122
|
+
/**
|
|
123
|
+
* @type {ClassRegistry<import("@vcmap/core").StyleItem>}
|
|
124
|
+
*/
|
|
125
|
+
export const styleClassRegistry = new ClassRegistry();
|
|
126
|
+
/**
|
|
127
|
+
* @type {ClassRegistry<import("@vcmap/core").Category<*>>}
|
|
128
|
+
*/
|
|
129
|
+
export const categoryClassRegistry = new ClassRegistry();
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* Returns an object based on a class registry or override class registry and a typed options object. as opposed to ClassRegistry.createFromTypedOptions, this function never throws.
|
|
133
|
+
* @api stable
|
|
134
|
+
* @template {Object|import("@vcmap/core").VcsObject} T
|
|
135
|
+
* @param {OverrideClassRegistry<T>|ClassRegistry<T>} classRegistry
|
|
136
|
+
* @param {Object} options
|
|
137
|
+
* @param {...*} args
|
|
138
|
+
* @returns {T|null}
|
|
139
|
+
*/
|
|
140
|
+
export function getObjectFromClassRegistry(classRegistry, options, ...args) { // move to classReg
|
|
141
|
+
if (!is(classRegistry, [ClassRegistry, OverrideClassRegistry])) {
|
|
142
|
+
logger().error(`ObjectCreation failed: no class registry provided for ${options}`);
|
|
143
|
+
return null;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
if (!options?.type) {
|
|
147
|
+
logger().warning(`ObjectCreation failed: could not find type in options ${options}`);
|
|
148
|
+
return null;
|
|
149
|
+
}
|
|
150
|
+
let object;
|
|
151
|
+
try {
|
|
152
|
+
object = classRegistry.createFromTypeOptions(options, ...args);
|
|
153
|
+
} catch (ex) {
|
|
154
|
+
logger().warning(`Error: ${ex}`);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
if (!object) {
|
|
158
|
+
logger().warning('ObjectCreation failed: could not create new Object');
|
|
159
|
+
return null;
|
|
160
|
+
}
|
|
161
|
+
return object;
|
|
162
|
+
}
|
package/src/context.js
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { v4 as uuidv4, v5 as uuidv5 } from 'uuid';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @typedef {Object} VcsAppConfig
|
|
5
|
+
* @property {string|undefined} [id]
|
|
6
|
+
* @property {Array<LayerOptions>} [layers]
|
|
7
|
+
* @property {Array<VcsMapOptions>} [maps]
|
|
8
|
+
* @property {Array<StyleItemOptions>} [styles]
|
|
9
|
+
* @property {Array<ViewPointOptions>} [viewpoints]
|
|
10
|
+
* @property {string} [startingViewPointName]
|
|
11
|
+
* @property {string} [startingMapName]
|
|
12
|
+
* @property {ProjectionOptions} [projection]
|
|
13
|
+
* @property {Array<{ name: string, items: Array<Object> }>} [categories]
|
|
14
|
+
* @property {Array<ObliqueCollectionOptions>} [obliqueCollections]
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* @type {string}
|
|
19
|
+
*/
|
|
20
|
+
const uuidNamespace = uuidv4();
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* @class
|
|
24
|
+
*/
|
|
25
|
+
class Context {
|
|
26
|
+
/**
|
|
27
|
+
* @param {VcsAppConfig} config
|
|
28
|
+
*/
|
|
29
|
+
constructor(config) {
|
|
30
|
+
/**
|
|
31
|
+
* @type {VcsAppConfig}
|
|
32
|
+
* @private
|
|
33
|
+
*/
|
|
34
|
+
this._config = config;
|
|
35
|
+
/**
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @private
|
|
38
|
+
*/
|
|
39
|
+
this._checkSum = uuidv5(JSON.stringify(config), uuidNamespace);
|
|
40
|
+
/**
|
|
41
|
+
* @type {string}
|
|
42
|
+
* @private
|
|
43
|
+
*/
|
|
44
|
+
this._id = config.id || this._checkSum;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* @type {string}
|
|
49
|
+
* @readonly
|
|
50
|
+
*/
|
|
51
|
+
get id() {
|
|
52
|
+
return this._id;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* @type {string}
|
|
57
|
+
* @readonly
|
|
58
|
+
*/
|
|
59
|
+
get checkSum() {
|
|
60
|
+
return this._checkSum;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* @type {VcsAppConfig}
|
|
65
|
+
* @readonly
|
|
66
|
+
*/
|
|
67
|
+
get config() {
|
|
68
|
+
return JSON.parse(JSON.stringify(this._config));
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export default Context;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { v4 as uuidv4 } from 'uuid';
|
|
2
2
|
import { parseBoolean } from '@vcsuite/parsers';
|
|
3
|
-
import { vcsLayerName } from '
|
|
4
|
-
import VcsObject from '
|
|
3
|
+
import { vcsLayerName } from '../layer/layerSymbols.js';
|
|
4
|
+
import VcsObject from '../vcsObject.js';
|
|
5
5
|
import { getStyleOrDefaultStyle } from '../style/styleFactory.js';
|
|
6
6
|
import { defaultVectorStyle } from '../style/vectorStyleItem.js';
|
|
7
|
-
import VectorProperties from '
|
|
7
|
+
import VectorProperties from '../layer/vectorProperties.js';
|
|
8
8
|
import { isProvidedFeature, showProvidedFeature } from './featureProviderSymbols.js';
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -22,14 +22,13 @@ import { isProvidedFeature, showProvidedFeature } from './featureProviderSymbols
|
|
|
22
22
|
|
|
23
23
|
/**
|
|
24
24
|
* An abstract class providing features for {@link Layer}s which cannot provide features directly, but can provide features for
|
|
25
|
-
* a given location, e.g.
|
|
25
|
+
* a given location, e.g. WmsLayer with a getFeatureInfo configuration. In this case, a feature provider can be created for this layer.
|
|
26
26
|
* @class
|
|
27
|
-
* @export
|
|
28
27
|
* @abstract
|
|
29
28
|
* @api
|
|
30
29
|
*/
|
|
31
30
|
class AbstractFeatureProvider extends VcsObject {
|
|
32
|
-
static get className() { return '
|
|
31
|
+
static get className() { return 'AbstractFeatureProvider'; }
|
|
33
32
|
|
|
34
33
|
/**
|
|
35
34
|
* @returns {AbstractFeatureProviderOptions}
|
|
@@ -154,9 +153,9 @@ class AbstractFeatureProvider extends VcsObject {
|
|
|
154
153
|
* @returns {AbstractFeatureProviderOptions}
|
|
155
154
|
* @api
|
|
156
155
|
*/
|
|
157
|
-
|
|
156
|
+
toJSON() {
|
|
158
157
|
const config =
|
|
159
|
-
/** @type {AbstractFeatureProviderOptions} */ (super.
|
|
158
|
+
/** @type {AbstractFeatureProviderOptions} */ (super.toJSON());
|
|
160
159
|
|
|
161
160
|
const defaultOptions = AbstractFeatureProvider.getDefaultOptions();
|
|
162
161
|
delete config.name; // the name is irrelevant, since its the layers name
|
|
@@ -170,7 +169,7 @@ class AbstractFeatureProvider extends VcsObject {
|
|
|
170
169
|
}
|
|
171
170
|
|
|
172
171
|
if (this.style) {
|
|
173
|
-
config.style = this.style.
|
|
172
|
+
config.style = this.style.toJSON();
|
|
174
173
|
}
|
|
175
174
|
|
|
176
175
|
const vectorPropertiesConfig = this.vectorProperties
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { getCenter } from 'ol/extent.js';
|
|
2
|
-
import Projection from '../projection.js';
|
|
3
|
-
import
|
|
2
|
+
import Projection from '../util/projection.js';
|
|
3
|
+
import Extent3D from '../util/featureconverter/extent3D.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* @param {VectorClickedObject} feature
|
|
@@ -32,9 +32,8 @@ export function getGenericFeatureFromProvidedFeature(feature, layer) {
|
|
|
32
32
|
|
|
33
33
|
let heightOffset = clickedPosition.height;
|
|
34
34
|
if (!isModel) {
|
|
35
|
-
const extent =
|
|
36
|
-
|
|
37
|
-
heightOffset = max;
|
|
35
|
+
const extent = Extent3D.fromGeometry(geometry);
|
|
36
|
+
heightOffset = Number.isFinite(extent.maxZ) ? extent.maxZ : 0;
|
|
38
37
|
}
|
|
39
38
|
const relativeToGround = !isModel && feature.get('olcs_altitudeMode') === 'relativeToGround';
|
|
40
39
|
|
|
File without changes
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import AbstractFeatureProvider from './abstractFeatureProvider.js';
|
|
2
|
+
import { featureProviderClassRegistry } from '../classRegistry.js';
|
|
2
3
|
|
|
3
4
|
|
|
4
5
|
/**
|
|
@@ -12,7 +13,7 @@ import AbstractFeatureProvider from './abstractFeatureProvider.js';
|
|
|
12
13
|
* @extends {AbstractFeatureProvider}
|
|
13
14
|
*/
|
|
14
15
|
class TileProviderFeatureProvider extends AbstractFeatureProvider {
|
|
15
|
-
static get className() { return '
|
|
16
|
+
static get className() { return 'TileProviderFeatureProvider'; }
|
|
16
17
|
|
|
17
18
|
/**
|
|
18
19
|
* @param {string} layerName
|
|
@@ -26,7 +27,7 @@ class TileProviderFeatureProvider extends AbstractFeatureProvider {
|
|
|
26
27
|
* @type {Array<string>}
|
|
27
28
|
* @api
|
|
28
29
|
*/
|
|
29
|
-
this.mapTypes = ['
|
|
30
|
+
this.mapTypes = ['CesiumMap'];
|
|
30
31
|
|
|
31
32
|
/**
|
|
32
33
|
* TileProvider
|
|
@@ -60,3 +61,4 @@ class TileProviderFeatureProvider extends AbstractFeatureProvider {
|
|
|
60
61
|
}
|
|
61
62
|
|
|
62
63
|
export default TileProviderFeatureProvider;
|
|
64
|
+
featureProviderClassRegistry.registerClass(TileProviderFeatureProvider.className, TileProviderFeatureProvider);
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import axios from 'axios';
|
|
2
1
|
import GML2 from 'ol/format/GML2.js';
|
|
3
2
|
import WFS from 'ol/format/WFS.js';
|
|
4
3
|
import GeoJSON from 'ol/format/GeoJSON.js';
|
|
@@ -7,14 +6,16 @@ import Point from 'ol/geom/Point.js';
|
|
|
7
6
|
import { getTransform } from 'ol/proj.js';
|
|
8
7
|
import { parseInteger } from '@vcsuite/parsers';
|
|
9
8
|
import AbstractFeatureProvider from './abstractFeatureProvider.js';
|
|
10
|
-
import Projection, { mercatorProjection } from '../projection.js';
|
|
11
|
-
import { getWMSSource } from '
|
|
12
|
-
import Extent from '../extent.js';
|
|
9
|
+
import Projection, { mercatorProjection } from '../util/projection.js';
|
|
10
|
+
import { getWMSSource } from '../layer/wmsHelpers.js';
|
|
11
|
+
import Extent from '../util/extent.js';
|
|
12
|
+
import { requestJson } from '../util/fetch.js';
|
|
13
|
+
import { featureProviderClassRegistry } from '../classRegistry.js';
|
|
13
14
|
|
|
14
15
|
/**
|
|
15
16
|
* @typedef {AbstractFeatureProviderOptions} WMSFeatureProviderOptions
|
|
16
17
|
* @property {string|undefined} [responseType='text/xml'] - the response type for the feature info
|
|
17
|
-
* @property {Object|undefined} formatOptions - format options for the
|
|
18
|
+
* @property {Object|undefined} formatOptions - format options for the GeojsonLayer, WfsLayer or GML format. To overwrite the gmlFormat option in WfsLayer format, use 'GML', 'GML2' or 'GML3' as string
|
|
18
19
|
* @property {ProjectionOptions|undefined} projection - the projection of the data, if not encoded in the response
|
|
19
20
|
* @property {string} url
|
|
20
21
|
* @property {string} [tilingSchema='geographic'] - either "geographic" or "mercator"
|
|
@@ -67,11 +68,10 @@ export function getFormat(responseType, options = {}) {
|
|
|
67
68
|
|
|
68
69
|
/**
|
|
69
70
|
* @class
|
|
70
|
-
* @export
|
|
71
71
|
* @extends {AbstractFeatureProvider}
|
|
72
72
|
*/
|
|
73
73
|
class WMSFeatureProvider extends AbstractFeatureProvider {
|
|
74
|
-
static get className() { return '
|
|
74
|
+
static get className() { return 'WMSFeatureProvider'; }
|
|
75
75
|
|
|
76
76
|
/**
|
|
77
77
|
* @returns {WMSFeatureProviderOptions}
|
|
@@ -124,7 +124,7 @@ class WMSFeatureProvider extends AbstractFeatureProvider {
|
|
|
124
124
|
version: options.version || defaultOptions.version,
|
|
125
125
|
};
|
|
126
126
|
/**
|
|
127
|
-
* The
|
|
127
|
+
* The WmsLayer Source used to generate getFeatureInfo urls
|
|
128
128
|
* @type {import("ol/source/TileWMS").default}
|
|
129
129
|
* @api
|
|
130
130
|
*/
|
|
@@ -155,12 +155,11 @@ class WMSFeatureProvider extends AbstractFeatureProvider {
|
|
|
155
155
|
}
|
|
156
156
|
|
|
157
157
|
/**
|
|
158
|
-
* @param {import("
|
|
158
|
+
* @param {import("ol/format/GeoJSON").GeoJSONObject} data
|
|
159
159
|
* @param {import("ol/coordinate").Coordinate} coordinate
|
|
160
160
|
* @returns {Array<import("ol").Feature<import("ol/geom/Geometry").default>>}
|
|
161
161
|
*/
|
|
162
|
-
featureResponseCallback(
|
|
163
|
-
const { data } = response;
|
|
162
|
+
featureResponseCallback(data, coordinate) {
|
|
164
163
|
/** @type {Array<import("ol").Feature<import("ol/geom/Geometry").default>>} */
|
|
165
164
|
let features;
|
|
166
165
|
|
|
@@ -199,7 +198,8 @@ class WMSFeatureProvider extends AbstractFeatureProvider {
|
|
|
199
198
|
let coords = coordinate;
|
|
200
199
|
if (projection) {
|
|
201
200
|
const transform = getTransform(mercatorProjection.proj, projection);
|
|
202
|
-
|
|
201
|
+
// error in TransformFunction type definition, remove undefined after openlayer fixed the type
|
|
202
|
+
coords = transform(coordinate.slice(), undefined, undefined);
|
|
203
203
|
}
|
|
204
204
|
|
|
205
205
|
const metersPerUnit = 111194.87428468118;
|
|
@@ -211,8 +211,14 @@ class WMSFeatureProvider extends AbstractFeatureProvider {
|
|
|
211
211
|
);
|
|
212
212
|
|
|
213
213
|
if (url) {
|
|
214
|
-
|
|
215
|
-
|
|
214
|
+
let data;
|
|
215
|
+
try {
|
|
216
|
+
data = await requestJson(url);
|
|
217
|
+
} catch (ex) {
|
|
218
|
+
this.getLogger().error(`Failed fetching WMS FeatureInfo ${url}`);
|
|
219
|
+
return [];
|
|
220
|
+
}
|
|
221
|
+
return this.featureResponseCallback(data, coordinate)
|
|
216
222
|
.map(f => this.getProviderFeature(f));
|
|
217
223
|
}
|
|
218
224
|
return [];
|
|
@@ -222,8 +228,8 @@ class WMSFeatureProvider extends AbstractFeatureProvider {
|
|
|
222
228
|
* @inheritDoc
|
|
223
229
|
* @returns {WMSFeatureProviderOptions}
|
|
224
230
|
*/
|
|
225
|
-
|
|
226
|
-
const config = /** @type {WMSFeatureProviderOptions} */ (super.
|
|
231
|
+
toJSON() {
|
|
232
|
+
const config = /** @type {WMSFeatureProviderOptions} */ (super.toJSON());
|
|
227
233
|
const defaultOptions = WMSFeatureProvider.getDefaultOptions();
|
|
228
234
|
if (this.featureInfoResponseType !== defaultOptions.responseType) {
|
|
229
235
|
config.responseType = this.featureInfoResponseType;
|
|
@@ -234,7 +240,7 @@ class WMSFeatureProvider extends AbstractFeatureProvider {
|
|
|
234
240
|
}
|
|
235
241
|
|
|
236
242
|
if (this.projection !== defaultOptions.projection) {
|
|
237
|
-
config.projection = this.projection.
|
|
243
|
+
config.projection = this.projection.toJSON();
|
|
238
244
|
}
|
|
239
245
|
|
|
240
246
|
config.url = this._wmsSourceOptions.url;
|
|
@@ -259,7 +265,7 @@ class WMSFeatureProvider extends AbstractFeatureProvider {
|
|
|
259
265
|
config.tileSize = this._wmsSourceOptions.tileSize.slice();
|
|
260
266
|
}
|
|
261
267
|
if (this.extent) {
|
|
262
|
-
config.extent = this.extent.
|
|
268
|
+
config.extent = this.extent.toJSON();
|
|
263
269
|
}
|
|
264
270
|
|
|
265
271
|
return config;
|
|
@@ -278,3 +284,4 @@ class WMSFeatureProvider extends AbstractFeatureProvider {
|
|
|
278
284
|
}
|
|
279
285
|
|
|
280
286
|
export default WMSFeatureProvider;
|
|
287
|
+
featureProviderClassRegistry.registerClass(WMSFeatureProvider.className, WMSFeatureProvider);
|
|
@@ -22,12 +22,20 @@ import { EventType, ModificationKeyType, PointerKeyType } from './interactionTyp
|
|
|
22
22
|
/**
|
|
23
23
|
* An abstract interface for all interactions
|
|
24
24
|
* @class
|
|
25
|
-
* @export
|
|
26
25
|
* @abstract
|
|
27
26
|
* @api
|
|
28
27
|
*/
|
|
29
28
|
class AbstractInteraction {
|
|
30
|
-
|
|
29
|
+
/**
|
|
30
|
+
* @param {number} [defaultActive=EventType.NONE] - A bitmask representing the default {@link EventType} to listen to
|
|
31
|
+
* @param {number} [defaultModificationKey=ModificationKeyType.NONE] - A bitmask representing the default {@link ModificationKeyType} keys to listen to
|
|
32
|
+
* @param {number} [defaultPointerKey=PointerKeyType.LEFT] - A bitmask representing the {@link PointerKeyType} pointer key to listen to
|
|
33
|
+
*/
|
|
34
|
+
constructor(
|
|
35
|
+
defaultActive = EventType.NONE,
|
|
36
|
+
defaultModificationKey = ModificationKeyType.NONE,
|
|
37
|
+
defaultPointerKey = PointerKeyType.LEFT,
|
|
38
|
+
) {
|
|
31
39
|
/**
|
|
32
40
|
* A unique identifier for this interaction
|
|
33
41
|
* @type {string}
|
|
@@ -36,13 +44,10 @@ class AbstractInteraction {
|
|
|
36
44
|
this.id = uuidv4();
|
|
37
45
|
|
|
38
46
|
/**
|
|
39
|
-
* A bitmask representing the default events to listen to
|
|
40
|
-
* {@link EventType}, default is NONE
|
|
41
47
|
* @type {number}
|
|
42
|
-
* @
|
|
43
|
-
* @api
|
|
48
|
+
* @private
|
|
44
49
|
*/
|
|
45
|
-
this._defaultActive =
|
|
50
|
+
this._defaultActive = defaultActive;
|
|
46
51
|
|
|
47
52
|
/**
|
|
48
53
|
* The current active bitmask for {@link EventType}
|
|
@@ -52,13 +57,10 @@ class AbstractInteraction {
|
|
|
52
57
|
this.active = this._defaultActive;
|
|
53
58
|
|
|
54
59
|
/**
|
|
55
|
-
* The default bitmask for modification keys to listen to,
|
|
56
|
-
* {@link ModificationKeyType} default is NONE
|
|
57
60
|
* @type {number}
|
|
58
|
-
* @
|
|
59
|
-
* @api
|
|
61
|
+
* @private
|
|
60
62
|
*/
|
|
61
|
-
this._defaultModificationKey =
|
|
63
|
+
this._defaultModificationKey = defaultModificationKey;
|
|
62
64
|
|
|
63
65
|
/**
|
|
64
66
|
* The current active {@link ModificationKeyType}
|
|
@@ -68,11 +70,10 @@ class AbstractInteraction {
|
|
|
68
70
|
this.modificationKey = this._defaultModificationKey;
|
|
69
71
|
|
|
70
72
|
/**
|
|
71
|
-
* default bitmask for pointer key {@link PointerKeyType}, starting value is LEFT
|
|
72
73
|
* @type {number}
|
|
73
|
-
* @
|
|
74
|
+
* @private
|
|
74
75
|
*/
|
|
75
|
-
this._defaultPointerKey =
|
|
76
|
+
this._defaultPointerKey = defaultPointerKey;
|
|
76
77
|
|
|
77
78
|
/**
|
|
78
79
|
* The currently active {@link PointerKeyType}
|
|
@@ -114,7 +115,7 @@ class AbstractInteraction {
|
|
|
114
115
|
}
|
|
115
116
|
|
|
116
117
|
/**
|
|
117
|
-
* Sets the modification key to listen to
|
|
118
|
+
* Sets the modification key to listen to or the default modification key if none is provided.
|
|
118
119
|
* @param {number=} mod
|
|
119
120
|
* @api
|
|
120
121
|
*/
|
|
@@ -127,8 +128,8 @@ class AbstractInteraction {
|
|
|
127
128
|
}
|
|
128
129
|
|
|
129
130
|
/**
|
|
130
|
-
* Sets the pointer key for this interaction
|
|
131
|
-
* @param {number} pointer
|
|
131
|
+
* Sets the pointer key for this interaction or the default pointer if none is provided.
|
|
132
|
+
* @param {number=} pointer
|
|
132
133
|
* @api
|
|
133
134
|
*/
|
|
134
135
|
setPointer(pointer) {
|
|
@@ -10,7 +10,7 @@ import { transformFromImage } from '../oblique/helpers.js';
|
|
|
10
10
|
*/
|
|
11
11
|
class CoordinateAtPixel extends AbstractInteraction {
|
|
12
12
|
constructor() {
|
|
13
|
-
super();
|
|
13
|
+
super(EventType.ALL, ModificationKeyType.ALL);
|
|
14
14
|
/**
|
|
15
15
|
* @type {import("@vcmap/cesium").Cartographic}
|
|
16
16
|
* @private
|
|
@@ -22,9 +22,6 @@ class CoordinateAtPixel extends AbstractInteraction {
|
|
|
22
22
|
*/
|
|
23
23
|
this._scratchCartesian = new Cartesian3();
|
|
24
24
|
|
|
25
|
-
this._defaultActive = EventType.ALL;
|
|
26
|
-
this._defaultModificationKey = ModificationKeyType.ALL;
|
|
27
|
-
|
|
28
25
|
this.setActive();
|
|
29
26
|
}
|
|
30
27
|
|
|
@@ -35,9 +32,9 @@ class CoordinateAtPixel extends AbstractInteraction {
|
|
|
35
32
|
*/
|
|
36
33
|
// eslint-disable-next-line class-methods-use-this
|
|
37
34
|
async pipe(event) {
|
|
38
|
-
if (event.map.className === '
|
|
35
|
+
if (event.map.className === 'CesiumMap') {
|
|
39
36
|
return this._cesiumHandler(event);
|
|
40
|
-
} else if (event.map.className === '
|
|
37
|
+
} else if (event.map.className === 'ObliqueMap') {
|
|
41
38
|
return CoordinateAtPixel.obliqueHandler(event);
|
|
42
39
|
}
|
|
43
40
|
return event;
|
|
@@ -74,10 +71,10 @@ class CoordinateAtPixel extends AbstractInteraction {
|
|
|
74
71
|
* @private
|
|
75
72
|
*/
|
|
76
73
|
static obliqueHandler(event) {
|
|
77
|
-
const obliqueMap = /** @type {import("@vcmap/core").
|
|
74
|
+
const obliqueMap = /** @type {import("@vcmap/core").ObliqueMap} */ (event.map);
|
|
78
75
|
const image = obliqueMap.currentImage;
|
|
79
76
|
if (image) {
|
|
80
|
-
// don't use
|
|
77
|
+
// don't use TerrainLayer for coordinate Transformation if the event is a move or drag event,
|
|
81
78
|
// to avoid requesting the terrain each mousemove...
|
|
82
79
|
// XXX but what about DRAGSTART and DRAGEND? this could be usefull, no?
|
|
83
80
|
const move = event.type & (EventType.MOVE ^ EventType.DRAGEVENTS);
|
|
@@ -85,7 +82,7 @@ class CoordinateAtPixel extends AbstractInteraction {
|
|
|
85
82
|
if (Number.isFinite(pixel[0]) && Number.isFinite(pixel[1])) {
|
|
86
83
|
return transformFromImage(image, pixel, {
|
|
87
84
|
dontUseTerrain: !!move,
|
|
88
|
-
dataProjection: mercatorProjection
|
|
85
|
+
dataProjection: mercatorProjection,
|
|
89
86
|
}).then((coordinates) => {
|
|
90
87
|
event.obliqueParameters = { pixel };
|
|
91
88
|
event.position = coordinates.coords;
|
|
@@ -9,7 +9,7 @@ import CoordinateAtPixel from './coordinateAtPixel.js';
|
|
|
9
9
|
import FeatureAtPixelInteraction from './featureAtPixelInteraction.js';
|
|
10
10
|
import { EventType, PointerEventType } from './interactionType.js';
|
|
11
11
|
import FeatureProviderInteraction from './featureProviderInteraction.js';
|
|
12
|
-
import VcsEvent from '../
|
|
12
|
+
import VcsEvent from '../vcsEvent.js';
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* @namespace interaction
|
|
@@ -31,7 +31,7 @@ import VcsEvent from '../event/vcsEvent.js';
|
|
|
31
31
|
* @property {import("@vcmap/core").ModificationKeyType} key
|
|
32
32
|
* @property {import("@vcmap/core").PointerKeyType} pointer
|
|
33
33
|
* @property {import("ol/coordinate").Coordinate|undefined} position - position in web mercator coordinates
|
|
34
|
-
* @property {import("ol/coordinate").Coordinate|undefined} positionOrPixel - position in web mercator coordinates or image coordinates in
|
|
34
|
+
* @property {import("ol/coordinate").Coordinate|undefined} positionOrPixel - position in web mercator coordinates or image coordinates in ObliqueMap Map Mode
|
|
35
35
|
* @property {boolean|undefined} multipleTouch - vcs:undocumented
|
|
36
36
|
* @property {number|null|undefined} time - vcs:undocumented
|
|
37
37
|
*/
|
|
@@ -47,7 +47,7 @@ import VcsEvent from '../event/vcsEvent.js';
|
|
|
47
47
|
* @returns {import("@vcsuite/logger").Logger}
|
|
48
48
|
*/
|
|
49
49
|
function getLogger() {
|
|
50
|
-
return getLoggerByName('
|
|
50
|
+
return getLoggerByName('EventHandler');
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
/**
|