@vcmap/core 5.0.0-rc.24 → 5.0.0-rc.26
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/build/postinstall.js +2 -2
- package/index.d.ts +433 -313
- package/index.js +1 -2
- package/package.json +2 -2
- package/src/cesium/cesium3DTileFeature.js +1 -1
- package/src/cesium/cesium3DTilePointFeature.js +1 -1
- package/src/cesium/cesiumVcsCameraPrimitive.js +3 -3
- package/src/cesium/entity.js +1 -1
- package/src/cesium/wallpaperMaterial.js +1 -1
- package/src/interaction/abstractInteraction.js +2 -2
- package/src/interaction/coordinateAtPixel.js +3 -3
- package/src/interaction/eventHandler.js +3 -3
- package/src/interaction/featureAtPixelInteraction.js +1 -1
- package/src/layer/cesium/cesiumTilesetCesiumImpl.js +16 -31
- package/src/layer/cesium/clusterContext.js +12 -6
- package/src/layer/cesium/dataSourceCesiumImpl.js +6 -6
- package/src/layer/cesium/openStreetMapCesiumImpl.js +2 -2
- package/src/layer/cesium/rasterLayerCesiumImpl.js +4 -4
- package/src/layer/cesium/singleImageCesiumImpl.js +2 -2
- package/src/layer/cesium/tmsCesiumImpl.js +2 -2
- package/src/layer/cesium/vectorCesiumImpl.js +20 -5
- package/src/layer/cesium/vectorContext.js +101 -33
- package/src/layer/cesium/vectorRasterTileCesiumImpl.js +2 -3
- package/src/layer/cesium/vectorTileImageryProvider.js +7 -7
- package/src/layer/cesium/wmsCesiumImpl.js +1 -1
- package/src/layer/cesium/wmtsCesiumImpl.js +2 -2
- package/src/layer/cesium/x3dmHelper.js +1 -1
- package/src/layer/cesiumTilesetLayer.js +6 -54
- package/src/layer/czmlLayer.js +2 -2
- package/src/layer/dataSourceLayer.js +7 -7
- package/src/layer/featureLayer.js +49 -1
- package/src/layer/featureStoreLayer.js +3 -3
- package/src/layer/featureVisibility.js +18 -18
- package/src/layer/globalHider.js +3 -3
- package/src/layer/layer.js +8 -2
- package/src/layer/layerSymbols.js +2 -1
- package/src/layer/oblique/obliqueHelpers.js +1 -1
- package/src/layer/oblique/vectorObliqueImpl.js +6 -0
- package/src/layer/openStreetMapLayer.js +11 -5
- package/src/layer/openlayers/layerOpenlayersImpl.js +69 -4
- package/src/layer/openlayers/rasterLayerOpenlayersImpl.js +0 -80
- package/src/layer/rasterLayer.js +9 -9
- package/src/layer/terrainHelpers.js +6 -6
- package/src/layer/tileLoadedHelper.js +1 -1
- package/src/layer/tileProvider/tileProvider.js +4 -4
- package/src/layer/tileProvider/urlTemplateTileProvider.js +2 -2
- package/src/layer/vectorLayer.js +7 -6
- package/src/layer/vectorProperties.js +33 -33
- package/src/map/baseOLMap.js +18 -1
- package/src/map/cameraLimiter.js +9 -9
- package/src/map/cesiumMap.js +71 -138
- package/src/map/openlayersMap.js +1 -1
- package/src/map/vcsMap.js +29 -11
- package/src/oblique/helpers.js +3 -3
- package/src/oblique/obliqueDataSet.js +2 -2
- package/src/oblique/obliqueImage.js +8 -8
- package/src/oblique/obliqueImageMeta.js +2 -2
- package/src/oblique/parseImageJson.js +2 -2
- package/src/style/arcStyle.js +1 -1
- package/src/style/arrowStyle.js +1 -1
- package/src/style/declarativeStyleItem.js +13 -9
- package/src/style/styleHelpers.js +4 -4
- package/src/style/styleItem.js +5 -5
- package/src/style/vectorStyleItem.js +4 -4
- package/src/util/clipping/clippingObject.js +8 -8
- package/src/util/clipping/clippingObjectManager.js +1 -1
- package/src/util/clipping/clippingPlaneHelper.js +28 -28
- package/src/util/editor/editorHelpers.js +9 -9
- package/src/util/editor/interactions/editFeaturesMouseOverInteraction.js +2 -2
- package/src/util/editor/interactions/editGeometryMouseOverInteraction.js +2 -2
- package/src/util/editor/interactions/selectMultiFeatureInteraction.js +2 -2
- package/src/util/editor/interactions/selectSingleFeatureInteraction.js +2 -2
- package/src/util/editor/transformation/create2DHandlers.js +1 -1
- package/src/util/editor/transformation/create3DHandlers.js +21 -21
- package/src/util/editor/transformation/extrudeInteraction.js +1 -1
- package/src/util/editor/transformation/rotateInteraction.js +8 -8
- package/src/util/editor/transformation/scaleInteraction.js +6 -6
- package/src/util/editor/transformation/transformationHandler.js +1 -1
- package/src/util/editor/transformation/transformationTypes.js +2 -2
- package/src/util/editor/transformation/translateInteraction.js +6 -6
- package/src/util/featureconverter/arcToCesium.js +3 -3
- package/src/util/featureconverter/circleToCesium.js +8 -8
- package/src/util/featureconverter/convert.js +2 -2
- package/src/util/featureconverter/featureconverterHelper.js +18 -18
- package/src/util/featureconverter/lineStringToCesium.js +8 -8
- package/src/util/featureconverter/pointHelpers.js +20 -20
- package/src/util/featureconverter/pointToCesium.js +7 -7
- package/src/util/featureconverter/polygonToCesium.js +5 -5
- package/src/util/mapCollection.js +31 -25
- package/src/util/math.js +5 -5
- package/src/util/viewpoint.js +2 -2
- package/tests/unit/helpers/cesiumHelpers.js +1 -1
- package/tests/unit/helpers/helpers.js +1 -1
- package/tests/unit/helpers/terrain/terrainData.js +1 -1
- package/src/util/splitScreen.js +0 -233
package/src/layer/rasterLayer.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SplitDirection, WebMercatorTilingScheme, GeographicTilingScheme, Cartographic } from '@vcmap/
|
|
1
|
+
import { SplitDirection, WebMercatorTilingScheme, GeographicTilingScheme, Cartographic } from '@vcmap-cesium/engine';
|
|
2
2
|
import { getBottomLeft, getBottomRight, getTopLeft, getTopRight } from 'ol/extent.js';
|
|
3
3
|
|
|
4
4
|
import { parseInteger, parseNumberRange, parseEnumValue } from '@vcsuite/parsers';
|
|
@@ -24,14 +24,14 @@ import { layerClassRegistry } from '../classRegistry.js';
|
|
|
24
24
|
* @property {number} maxLevel
|
|
25
25
|
* @property {string} tilingSchema
|
|
26
26
|
* @property {number} opacity
|
|
27
|
-
* @property {import("@vcmap/cesium").SplitDirection} splitDirection
|
|
28
27
|
* @property {Extent|undefined} extent
|
|
28
|
+
* @property {import("@vcmap-cesium/engine").SplitDirection} splitDirection
|
|
29
29
|
*/
|
|
30
30
|
|
|
31
31
|
/**
|
|
32
32
|
* @typedef {import("@vcmap/core").LayerImplementation<import("@vcmap/core").VcsMap>} RasterLayerImplementation
|
|
33
33
|
* @property {function(number):void} updateOpacity
|
|
34
|
-
* @property {function(import("@vcmap/
|
|
34
|
+
* @property {function(import("@vcmap-cesium/engine").SplitDirection):void} updateSplitDirection
|
|
35
35
|
* @api
|
|
36
36
|
*/
|
|
37
37
|
|
|
@@ -50,7 +50,7 @@ export const TilingScheme = {
|
|
|
50
50
|
/**
|
|
51
51
|
* Gets the tiling scheme associated with this layerConfig
|
|
52
52
|
* @param {Object} layerOptions
|
|
53
|
-
* @returns {import("@vcmap/
|
|
53
|
+
* @returns {import("@vcmap-cesium/engine").WebMercatorTilingScheme|import("@vcmap-cesium/engine").GeographicTilingScheme}
|
|
54
54
|
*/
|
|
55
55
|
export function getTilingScheme(layerOptions) {
|
|
56
56
|
const tilingSchemeOptions = {};
|
|
@@ -68,7 +68,7 @@ export function getTilingScheme(layerOptions) {
|
|
|
68
68
|
|
|
69
69
|
/**
|
|
70
70
|
* @param {Extent} extent
|
|
71
|
-
* @param {import("@vcmap/
|
|
71
|
+
* @param {import("@vcmap-cesium/engine").GeographicTilingScheme|import("@vcmap-cesium/engine").WebMercatorTilingScheme} tilingScheme
|
|
72
72
|
* @param {number} maxLevel
|
|
73
73
|
* @param {number} [minLevel=0]
|
|
74
74
|
* @returns {number}
|
|
@@ -164,7 +164,7 @@ class RasterLayer extends Layer {
|
|
|
164
164
|
*/
|
|
165
165
|
this._opacity = parseNumberRange(options.opacity, defaultOptions.opacity, 0.0, 1.0);
|
|
166
166
|
|
|
167
|
-
/** @type {import("@vcmap/
|
|
167
|
+
/** @type {import("@vcmap-cesium/engine").SplitDirection} */
|
|
168
168
|
this._splitDirection = SplitDirection.NONE;
|
|
169
169
|
|
|
170
170
|
if (options.splitDirection) {
|
|
@@ -175,7 +175,7 @@ class RasterLayer extends Layer {
|
|
|
175
175
|
|
|
176
176
|
/**
|
|
177
177
|
* raised if the split direction changes, is passed the split direction as its only argument
|
|
178
|
-
* @type {VcsEvent<import("@vcmap/
|
|
178
|
+
* @type {VcsEvent<import("@vcmap-cesium/engine").SplitDirection>}
|
|
179
179
|
* @api
|
|
180
180
|
*/
|
|
181
181
|
this.splitDirectionChanged = new VcsEvent();
|
|
@@ -184,12 +184,12 @@ class RasterLayer extends Layer {
|
|
|
184
184
|
/**
|
|
185
185
|
* The split directions of this layer
|
|
186
186
|
* @api
|
|
187
|
-
* @type {import("@vcmap/
|
|
187
|
+
* @type {import("@vcmap-cesium/engine").SplitDirection}
|
|
188
188
|
*/
|
|
189
189
|
get splitDirection() { return this._splitDirection; }
|
|
190
190
|
|
|
191
191
|
/**
|
|
192
|
-
* @param {import("@vcmap/
|
|
192
|
+
* @param {import("@vcmap-cesium/engine").SplitDirection} direction
|
|
193
193
|
*/
|
|
194
194
|
set splitDirection(direction) {
|
|
195
195
|
if (direction !== this._splitDirection) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CesiumTerrainProvider, Cartographic, Cartesian2, sampleTerrainMostDetailed } from '@vcmap/
|
|
1
|
+
import { CesiumTerrainProvider, Cartographic, Cartesian2, sampleTerrainMostDetailed } from '@vcmap-cesium/engine';
|
|
2
2
|
import { getTransform } from 'ol/proj.js';
|
|
3
3
|
import { wgs84Projection } from '../util/projection.js';
|
|
4
4
|
|
|
@@ -11,13 +11,13 @@ import { wgs84Projection } from '../util/projection.js';
|
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
|
-
* @type {Object<string, import("@vcmap/
|
|
14
|
+
* @type {Object<string, import("@vcmap-cesium/engine").CesiumTerrainProvider>}
|
|
15
15
|
*/
|
|
16
16
|
const terrainProviders = {};
|
|
17
17
|
|
|
18
18
|
/**
|
|
19
19
|
* @param {TerrainProviderOptions} options
|
|
20
|
-
* @returns {import("@vcmap/
|
|
20
|
+
* @returns {import("@vcmap-cesium/engine").CesiumTerrainProvider}
|
|
21
21
|
*/
|
|
22
22
|
export function getTerrainProviderForUrl(options) {
|
|
23
23
|
if (!terrainProviders[options.url]) {
|
|
@@ -37,7 +37,7 @@ export function getTerrainProviderForUrl(options) {
|
|
|
37
37
|
|
|
38
38
|
/**
|
|
39
39
|
* changes input coordinate Array in place, new height can also be accessed by coordinates[x][2]
|
|
40
|
-
* @param {import("@vcmap/
|
|
40
|
+
* @param {import("@vcmap-cesium/engine").CesiumTerrainProvider} terrainProvider
|
|
41
41
|
* @param {Array<import("ol/coordinate").Coordinate>} coordinates
|
|
42
42
|
* @param {import("@vcmap/core").Projection=} optSourceProjection - if input is not WGS84
|
|
43
43
|
* @param {Array<import("ol/coordinate").Coordinate>=} result
|
|
@@ -70,9 +70,9 @@ export function getHeightFromTerrainProvider(terrainProvider, coordinates, optSo
|
|
|
70
70
|
|
|
71
71
|
/**
|
|
72
72
|
* checks, whether a terrain tile is available at given position or not
|
|
73
|
-
* @param {import("@vcmap/
|
|
73
|
+
* @param {import("@vcmap-cesium/engine").CesiumTerrainProvider} terrainProvider
|
|
74
74
|
* @param {number} level
|
|
75
|
-
* @param {import("@vcmap/
|
|
75
|
+
* @param {import("@vcmap-cesium/engine").Cartographic} position
|
|
76
76
|
* @returns {boolean}
|
|
77
77
|
*/
|
|
78
78
|
export function isTerrainTileAvailable(terrainProvider, level, position) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { v4 as uuidv4 } from 'uuid';
|
|
2
2
|
import RBush from 'rbush';
|
|
3
3
|
import { check } from '@vcsuite/check';
|
|
4
|
-
import { Rectangle, Math as CesiumMath, WebMercatorTilingScheme, Cartographic } from '@vcmap/
|
|
4
|
+
import { Rectangle, Math as CesiumMath, WebMercatorTilingScheme, Cartographic } from '@vcmap-cesium/engine';
|
|
5
5
|
import LRUCache from 'ol/structs/LRUCache.js';
|
|
6
6
|
import { buffer, createOrUpdateFromCoordinate } from 'ol/extent.js';
|
|
7
7
|
import { parseBoolean, parseInteger } from '@vcsuite/parsers';
|
|
@@ -35,7 +35,7 @@ for (let i = 0; i < mercatorResolutionsToLevel.length; i++) {
|
|
|
35
35
|
|
|
36
36
|
/**
|
|
37
37
|
* transforms cesium geographic rectangle to mercator extent
|
|
38
|
-
* @param {import("@vcmap/
|
|
38
|
+
* @param {import("@vcmap-cesium/engine").Rectangle} rectangle in wgs84 radians
|
|
39
39
|
* @returns {import("ol/extent").Extent} extent in mercator
|
|
40
40
|
*/
|
|
41
41
|
export function rectangleToExtent(rectangle) {
|
|
@@ -106,7 +106,7 @@ class TileProvider extends VcsObject {
|
|
|
106
106
|
|
|
107
107
|
/**
|
|
108
108
|
* Cesium Webmercator TilingScheme
|
|
109
|
-
* @type {import("@vcmap/
|
|
109
|
+
* @type {import("@vcmap-cesium/engine").WebMercatorTilingScheme}
|
|
110
110
|
* @api
|
|
111
111
|
* @readonly
|
|
112
112
|
*/
|
|
@@ -392,7 +392,7 @@ class TileProvider extends VcsObject {
|
|
|
392
392
|
|
|
393
393
|
/**
|
|
394
394
|
* @param {number} baseLevel
|
|
395
|
-
* @param {import("@vcmap/
|
|
395
|
+
* @param {import("@vcmap-cesium/engine").Cartographic} tileCenter
|
|
396
396
|
* @returns {Promise<import("rbush").default<tileProviderRTreeEntry>|null>}
|
|
397
397
|
* @private
|
|
398
398
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Math as CesiumMath, Rectangle } from '@vcmap/
|
|
1
|
+
import { Math as CesiumMath, Rectangle } from '@vcmap-cesium/engine';
|
|
2
2
|
import { parseGeoJSON } from '../geojsonHelpers.js';
|
|
3
3
|
import TileProvider from './tileProvider.js';
|
|
4
4
|
import { requestJson } from '../../util/fetch.js';
|
|
@@ -19,7 +19,7 @@ import { tileProviderClassRegistry } from '../../classRegistry.js';
|
|
|
19
19
|
* @param {number} x
|
|
20
20
|
* @param {number} y
|
|
21
21
|
* @param {number} z
|
|
22
|
-
* @param {import("@vcmap/
|
|
22
|
+
* @param {import("@vcmap-cesium/engine").Rectangle=} tilingExtent
|
|
23
23
|
* @param {string=} locale
|
|
24
24
|
* @returns {string}
|
|
25
25
|
*/
|
package/src/layer/vectorLayer.js
CHANGED
|
@@ -46,11 +46,11 @@ import { layerClassRegistry } from '../classRegistry.js';
|
|
|
46
46
|
* @typedef {Object} VectorGeometryFactoryType
|
|
47
47
|
* @property {function(Array<import("ol/geom/SimpleGeometry").default>):Array<import("ol/coordinate").Coordinate>} getCoordinates
|
|
48
48
|
* @property {function(import("ol/geom/SimpleGeometry").default, number):Object} getGeometryOptions
|
|
49
|
-
* @property {function(Object, number, boolean, number=):Array<import("@vcmap/
|
|
50
|
-
* @property {function(Object, number, boolean, number=):Array<import("@vcmap/
|
|
51
|
-
* @property {function(Object, number, boolean):Array<import("@vcmap/
|
|
52
|
-
* @property {function(Object, import("ol/style/Style").default):Array<import("@vcmap/
|
|
53
|
-
* @property {function(Object, import("ol/style/Style").default):Array<import("@vcmap/
|
|
49
|
+
* @property {function(Object, number, boolean, number=):Array<import("@vcmap-cesium/engine").PolygonGeometry|import("@vcmap-cesium/engine").CircleGeometry|import("@vcmap-cesium/engine").WallGeometry>} createSolidGeometries
|
|
50
|
+
* @property {function(Object, number, boolean, number=):Array<import("@vcmap-cesium/engine").CircleOutlineGeometry|import("@vcmap-cesium/engine").WallOutlineGeometry|import("@vcmap-cesium/engine").PolygonOutlineGeometry>} createOutlineGeometries
|
|
51
|
+
* @property {function(Object, number, boolean):Array<import("@vcmap-cesium/engine").CircleGeometry|import("@vcmap-cesium/engine").PolygonGeometry>} createFillGeometries
|
|
52
|
+
* @property {function(Object, import("ol/style/Style").default):Array<import("@vcmap-cesium/engine").GroundPolylineGeometry>} createGroundLineGeometries
|
|
53
|
+
* @property {function(Object, import("ol/style/Style").default):Array<import("@vcmap-cesium/engine").PolylineGeometry>} createLineGeometries
|
|
54
54
|
* @api
|
|
55
55
|
*/
|
|
56
56
|
|
|
@@ -62,7 +62,7 @@ import { layerClassRegistry } from '../classRegistry.js';
|
|
|
62
62
|
* @property {number} groundLevel - the level above or below mean sea level (minZ value or ground_level or 0)
|
|
63
63
|
* @property {number} skirt - a negative height to <i>push</i> the geometry visually into the ground
|
|
64
64
|
* @property {boolean} perPositionHeight
|
|
65
|
-
* @property {import("@vcmap/
|
|
65
|
+
* @property {import("@vcmap-cesium/engine").HeightReference} heightReference heightReference of the feature.
|
|
66
66
|
* @property {number} heightAboveGroundAdjustment
|
|
67
67
|
* @api
|
|
68
68
|
*/
|
|
@@ -84,6 +84,7 @@ import { layerClassRegistry } from '../classRegistry.js';
|
|
|
84
84
|
* VectorLayer Layer for OpenlayersMap, Cesium and ObliqueMap
|
|
85
85
|
* @class
|
|
86
86
|
* @extends {FeatureLayer}
|
|
87
|
+
* @implements {SplitLayer}
|
|
87
88
|
* @api stable
|
|
88
89
|
*/
|
|
89
90
|
class VectorLayer extends FeatureLayer {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import deepEqual from 'fast-deep-equal';
|
|
2
|
-
import { Cartesian3, ClassificationType, HeightReference, NearFarScalar } from '@vcmap/
|
|
2
|
+
import { Cartesian3, ClassificationType, HeightReference, NearFarScalar } from '@vcmap-cesium/engine';
|
|
3
3
|
import { check, checkMaybe } from '@vcsuite/check';
|
|
4
4
|
import { parseBoolean, parseEnumKey, parseInteger, parseNumber } from '@vcsuite/parsers';
|
|
5
5
|
import { getLogger as getLoggerByName } from '@vcsuite/logger';
|
|
@@ -88,10 +88,10 @@ export const PrimitiveOptionsType = {
|
|
|
88
88
|
};
|
|
89
89
|
|
|
90
90
|
/**
|
|
91
|
-
* @enum {import("@vcmap/
|
|
92
|
-
* @property {import("@vcmap/
|
|
93
|
-
* @property {import("@vcmap/
|
|
94
|
-
* @property {import("@vcmap/
|
|
91
|
+
* @enum {import("@vcmap-cesium/engine").HeightReference}
|
|
92
|
+
* @property {import("@vcmap-cesium/engine").HeightReference} clampToGround
|
|
93
|
+
* @property {import("@vcmap-cesium/engine").HeightReference} absolute
|
|
94
|
+
* @property {import("@vcmap-cesium/engine").HeightReference} relativeToGround
|
|
95
95
|
* @const
|
|
96
96
|
*/
|
|
97
97
|
export const AltitudeModeCesium = {
|
|
@@ -101,10 +101,10 @@ export const AltitudeModeCesium = {
|
|
|
101
101
|
};
|
|
102
102
|
|
|
103
103
|
/**
|
|
104
|
-
* @enum {import("@vcmap/
|
|
105
|
-
* @property {import("@vcmap/
|
|
106
|
-
* @property {import("@vcmap/
|
|
107
|
-
* @property {import("@vcmap/
|
|
104
|
+
* @enum {import("@vcmap-cesium/engine").ClassificationType}
|
|
105
|
+
* @property {import("@vcmap-cesium/engine").ClassificationType} both
|
|
106
|
+
* @property {import("@vcmap-cesium/engine").ClassificationType} cesium3DTile
|
|
107
|
+
* @property {import("@vcmap-cesium/engine").ClassificationType} terrain
|
|
108
108
|
* @const
|
|
109
109
|
*/
|
|
110
110
|
export const ClassificationTypeCesium = {
|
|
@@ -115,8 +115,8 @@ export const ClassificationTypeCesium = {
|
|
|
115
115
|
|
|
116
116
|
/**
|
|
117
117
|
* @param {Array<number>} value
|
|
118
|
-
* @param {import("@vcmap/
|
|
119
|
-
* @returns {import("@vcmap/
|
|
118
|
+
* @param {import("@vcmap-cesium/engine").NearFarScalar|undefined} defaultValue
|
|
119
|
+
* @returns {import("@vcmap-cesium/engine").NearFarScalar|undefined}
|
|
120
120
|
*/
|
|
121
121
|
export function parseNearFarScalar(value, defaultValue) {
|
|
122
122
|
if (Array.isArray(value)) {
|
|
@@ -132,8 +132,8 @@ export function parseNearFarScalar(value, defaultValue) {
|
|
|
132
132
|
|
|
133
133
|
/**
|
|
134
134
|
* @param {Array<number>} value
|
|
135
|
-
* @param {import("@vcmap/
|
|
136
|
-
* @returns {import("@vcmap/
|
|
135
|
+
* @param {import("@vcmap-cesium/engine").Cartesian3|undefined} defaultValue
|
|
136
|
+
* @returns {import("@vcmap-cesium/engine").Cartesian3|undefined}
|
|
137
137
|
*/
|
|
138
138
|
export function parseCartesian3(value, defaultValue) {
|
|
139
139
|
if (Array.isArray(value)) {
|
|
@@ -171,7 +171,7 @@ export function parseStoreyHeights(storeyHeights, defaultStoreyHeights) {
|
|
|
171
171
|
}
|
|
172
172
|
|
|
173
173
|
/**
|
|
174
|
-
* @param {import("@vcmap/
|
|
174
|
+
* @param {import("@vcmap-cesium/engine").HeightReference} altitudeMode
|
|
175
175
|
* @returns {string}
|
|
176
176
|
*/
|
|
177
177
|
export function getAltitudeModeOptions(altitudeMode) {
|
|
@@ -180,7 +180,7 @@ export function getAltitudeModeOptions(altitudeMode) {
|
|
|
180
180
|
}
|
|
181
181
|
|
|
182
182
|
/**
|
|
183
|
-
* @param {import("@vcmap/
|
|
183
|
+
* @param {import("@vcmap-cesium/engine").ClassificationType} classificationType
|
|
184
184
|
* @returns {string}
|
|
185
185
|
*/
|
|
186
186
|
export function getClassificationTypeOptions(classificationType) {
|
|
@@ -189,7 +189,7 @@ export function getClassificationTypeOptions(classificationType) {
|
|
|
189
189
|
}
|
|
190
190
|
|
|
191
191
|
/**
|
|
192
|
-
* @param {import("@vcmap/
|
|
192
|
+
* @param {import("@vcmap-cesium/engine").NearFarScalar} nearFarScalar
|
|
193
193
|
* @returns {Array<number>|undefined}
|
|
194
194
|
*/
|
|
195
195
|
export function getNearFarValueOptions(nearFarScalar) {
|
|
@@ -197,7 +197,7 @@ export function getNearFarValueOptions(nearFarScalar) {
|
|
|
197
197
|
}
|
|
198
198
|
|
|
199
199
|
/**
|
|
200
|
-
* @param {import("@vcmap/
|
|
200
|
+
* @param {import("@vcmap-cesium/engine").Cartesian3} cartesian3
|
|
201
201
|
* @returns {Array<number>|undefined}
|
|
202
202
|
*/
|
|
203
203
|
export function getCartesian3Options(cartesian3) {
|
|
@@ -252,7 +252,7 @@ class VectorProperties {
|
|
|
252
252
|
constructor(options) {
|
|
253
253
|
const defaultValues = VectorProperties.getDefaultOptions();
|
|
254
254
|
/**
|
|
255
|
-
* @type {import("@vcmap/
|
|
255
|
+
* @type {import("@vcmap-cesium/engine").HeightReference}
|
|
256
256
|
* @private
|
|
257
257
|
*/
|
|
258
258
|
this._altitudeMode = parseEnumKey(options.altitudeMode, AltitudeModeCesium, HeightReference.CLAMP_TO_GROUND);
|
|
@@ -264,20 +264,20 @@ class VectorProperties {
|
|
|
264
264
|
this._allowPicking = parseBoolean(options.allowPicking, defaultValues.allowPicking);
|
|
265
265
|
|
|
266
266
|
/**
|
|
267
|
-
* @type {import("@vcmap/
|
|
267
|
+
* @type {import("@vcmap-cesium/engine").ClassificationType|undefined}
|
|
268
268
|
* @private
|
|
269
269
|
*/
|
|
270
270
|
this._classificationType = parseEnumKey(options.classificationType, ClassificationTypeCesium, undefined);
|
|
271
271
|
|
|
272
272
|
|
|
273
273
|
/**
|
|
274
|
-
* @type {import("@vcmap/
|
|
274
|
+
* @type {import("@vcmap-cesium/engine").NearFarScalar|undefined}
|
|
275
275
|
* @private
|
|
276
276
|
*/
|
|
277
277
|
this._scaleByDistance = parseNearFarScalar(options.scaleByDistance, undefined);
|
|
278
278
|
|
|
279
279
|
/**
|
|
280
|
-
* @type {import("@vcmap/
|
|
280
|
+
* @type {import("@vcmap-cesium/engine").Cartesian3|undefined}
|
|
281
281
|
* @private
|
|
282
282
|
*/
|
|
283
283
|
this._eyeOffset = parseCartesian3(options.eyeOffset, undefined);
|
|
@@ -411,7 +411,7 @@ class VectorProperties {
|
|
|
411
411
|
}
|
|
412
412
|
|
|
413
413
|
/**
|
|
414
|
-
* @type {import("@vcmap/
|
|
414
|
+
* @type {import("@vcmap-cesium/engine").HeightReference}
|
|
415
415
|
* @api
|
|
416
416
|
*/
|
|
417
417
|
get altitudeMode() {
|
|
@@ -419,7 +419,7 @@ class VectorProperties {
|
|
|
419
419
|
}
|
|
420
420
|
|
|
421
421
|
/**
|
|
422
|
-
* @param {import("@vcmap/
|
|
422
|
+
* @param {import("@vcmap-cesium/engine").HeightReference} altitudeMode
|
|
423
423
|
*/
|
|
424
424
|
set altitudeMode(altitudeMode) {
|
|
425
425
|
if (altitudeMode !== this._altitudeMode) {
|
|
@@ -431,7 +431,7 @@ class VectorProperties {
|
|
|
431
431
|
|
|
432
432
|
/**
|
|
433
433
|
* @param {import("ol").Feature<import("ol/geom/Geometry").default>} feature
|
|
434
|
-
* @returns {import("@vcmap/
|
|
434
|
+
* @returns {import("@vcmap-cesium/engine").HeightReference}
|
|
435
435
|
* @api
|
|
436
436
|
*/
|
|
437
437
|
getAltitudeMode(feature) {
|
|
@@ -470,7 +470,7 @@ class VectorProperties {
|
|
|
470
470
|
|
|
471
471
|
|
|
472
472
|
/**
|
|
473
|
-
* @type {import("@vcmap/
|
|
473
|
+
* @type {import("@vcmap-cesium/engine").ClassificationType|undefined}
|
|
474
474
|
* @api
|
|
475
475
|
*/
|
|
476
476
|
get classificationType() {
|
|
@@ -478,7 +478,7 @@ class VectorProperties {
|
|
|
478
478
|
}
|
|
479
479
|
|
|
480
480
|
/**
|
|
481
|
-
* @param {import("@vcmap/
|
|
481
|
+
* @param {import("@vcmap-cesium/engine").ClassificationType|undefined} classificationType
|
|
482
482
|
*/
|
|
483
483
|
set classificationType(classificationType) {
|
|
484
484
|
if (classificationType !== this._classificationType) {
|
|
@@ -490,7 +490,7 @@ class VectorProperties {
|
|
|
490
490
|
|
|
491
491
|
/**
|
|
492
492
|
* @param {import("ol").Feature<import("ol/geom/Geometry").default>} feature
|
|
493
|
-
* @returns {import("@vcmap/
|
|
493
|
+
* @returns {import("@vcmap-cesium/engine").ClassificationType|undefined}
|
|
494
494
|
* @api
|
|
495
495
|
*/
|
|
496
496
|
getClassificationType(feature) {
|
|
@@ -499,7 +499,7 @@ class VectorProperties {
|
|
|
499
499
|
}
|
|
500
500
|
|
|
501
501
|
/**
|
|
502
|
-
* @type {import("@vcmap/
|
|
502
|
+
* @type {import("@vcmap-cesium/engine").NearFarScalar|undefined}
|
|
503
503
|
* @api
|
|
504
504
|
*/
|
|
505
505
|
get scaleByDistance() {
|
|
@@ -507,7 +507,7 @@ class VectorProperties {
|
|
|
507
507
|
}
|
|
508
508
|
|
|
509
509
|
/**
|
|
510
|
-
* @param {import("@vcmap/
|
|
510
|
+
* @param {import("@vcmap-cesium/engine").NearFarScalar|undefined} value
|
|
511
511
|
*/
|
|
512
512
|
set scaleByDistance(value) {
|
|
513
513
|
if (!NearFarScalar.equals(value, this._scaleByDistance)) {
|
|
@@ -519,7 +519,7 @@ class VectorProperties {
|
|
|
519
519
|
|
|
520
520
|
/**
|
|
521
521
|
* @param {import("ol").Feature<import("ol/geom/Geometry").default>} feature
|
|
522
|
-
* @returns {import("@vcmap/
|
|
522
|
+
* @returns {import("@vcmap-cesium/engine").NearFarScalar|undefined}
|
|
523
523
|
* @api
|
|
524
524
|
*/
|
|
525
525
|
getScaleByDistance(feature) {
|
|
@@ -528,7 +528,7 @@ class VectorProperties {
|
|
|
528
528
|
}
|
|
529
529
|
|
|
530
530
|
/**
|
|
531
|
-
* @type {import("@vcmap/
|
|
531
|
+
* @type {import("@vcmap-cesium/engine").Cartesian3|undefined}
|
|
532
532
|
* @api
|
|
533
533
|
*/
|
|
534
534
|
get eyeOffset() {
|
|
@@ -536,7 +536,7 @@ class VectorProperties {
|
|
|
536
536
|
}
|
|
537
537
|
|
|
538
538
|
/**
|
|
539
|
-
* @param {import("@vcmap/
|
|
539
|
+
* @param {import("@vcmap-cesium/engine").Cartesian3|undefined} value
|
|
540
540
|
*/
|
|
541
541
|
set eyeOffset(value) {
|
|
542
542
|
if (!Cartesian3.equals(this.eyeOffset, value)) {
|
|
@@ -548,7 +548,7 @@ class VectorProperties {
|
|
|
548
548
|
|
|
549
549
|
/**
|
|
550
550
|
* @param {import("ol").Feature<import("ol/geom/Geometry").default>} feature
|
|
551
|
-
* @returns {import("@vcmap/
|
|
551
|
+
* @returns {import("@vcmap-cesium/engine").Cartesian3}
|
|
552
552
|
* @api
|
|
553
553
|
*/
|
|
554
554
|
getEyeOffset(feature) {
|
package/src/map/baseOLMap.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Cartesian2 } from '@vcmap/
|
|
1
|
+
import { Cartesian2 } from '@vcmap-cesium/engine';
|
|
2
2
|
import { unByKey } from 'ol/Observable.js';
|
|
3
3
|
import OLMap from 'ol/Map.js';
|
|
4
4
|
import { defaults as defaultInteractions } from 'ol/interaction.js';
|
|
@@ -60,6 +60,23 @@ class BaseOLMap extends VcsMap {
|
|
|
60
60
|
this._olListeners = [];
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
+
/**
|
|
64
|
+
* @type {number}
|
|
65
|
+
* @inheritDoc
|
|
66
|
+
*/
|
|
67
|
+
get splitPosition() {
|
|
68
|
+
return super.splitPosition;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* @param {number} position
|
|
73
|
+
* @inheritDoc
|
|
74
|
+
*/
|
|
75
|
+
set splitPosition(position) {
|
|
76
|
+
super.splitPosition = position;
|
|
77
|
+
this.requestRender();
|
|
78
|
+
}
|
|
79
|
+
|
|
63
80
|
/**
|
|
64
81
|
* @returns {import("ol/Map").default}
|
|
65
82
|
* @readonly
|
package/src/map/cameraLimiter.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Cartographic, Ellipsoid, Math as CesiumMath, sampleTerrain, sampleTerrainMostDetailed } from '@vcmap/
|
|
1
|
+
import { Cartographic, Ellipsoid, Math as CesiumMath, sampleTerrain, sampleTerrainMostDetailed } from '@vcmap-cesium/engine';
|
|
2
2
|
import { checkMaybe } from '@vcsuite/check';
|
|
3
3
|
import { parseInteger, parseNumber, parseEnumValue } from '@vcsuite/parsers';
|
|
4
4
|
import { getTerrainProviderForUrl, isTerrainTileAvailable } from '../layer/terrainHelpers.js';
|
|
@@ -60,7 +60,7 @@ class CameraLimiter {
|
|
|
60
60
|
*/
|
|
61
61
|
this._terrainUrl = options.terrainUrl || defaultOptions.terrainUrl;
|
|
62
62
|
/**
|
|
63
|
-
* @type {import("@vcmap/
|
|
63
|
+
* @type {import("@vcmap-cesium/engine").CesiumTerrainProvider|null}
|
|
64
64
|
* @private
|
|
65
65
|
*/
|
|
66
66
|
this._terrainProvider = this._terrainUrl ? getTerrainProviderForUrl({ url: this._terrainUrl }) : null;
|
|
@@ -78,7 +78,7 @@ class CameraLimiter {
|
|
|
78
78
|
this.level = options.level === null ? null : parseInteger(options.level, defaultOptions.level);
|
|
79
79
|
/**
|
|
80
80
|
* last checked camera position
|
|
81
|
-
* @type {import("@vcmap/
|
|
81
|
+
* @type {import("@vcmap-cesium/engine").Cartographic}
|
|
82
82
|
*/
|
|
83
83
|
this.lastCheckedPosition = new Cartographic();
|
|
84
84
|
/**
|
|
@@ -116,8 +116,8 @@ class CameraLimiter {
|
|
|
116
116
|
}
|
|
117
117
|
|
|
118
118
|
/**
|
|
119
|
-
* @param {import("@vcmap/
|
|
120
|
-
* @returns {Promise<Array<import("@vcmap/
|
|
119
|
+
* @param {import("@vcmap-cesium/engine").Cartographic} cameraCartographic
|
|
120
|
+
* @returns {Promise<Array<import("@vcmap-cesium/engine").Cartographic>>}
|
|
121
121
|
* @private
|
|
122
122
|
*/
|
|
123
123
|
_limitWithLevel(cameraCartographic) {
|
|
@@ -128,8 +128,8 @@ class CameraLimiter {
|
|
|
128
128
|
}
|
|
129
129
|
|
|
130
130
|
/**
|
|
131
|
-
* @param {import("@vcmap/
|
|
132
|
-
* @returns {Promise<Array<import("@vcmap/
|
|
131
|
+
* @param {import("@vcmap-cesium/engine").Cartographic} cameraCartographic
|
|
132
|
+
* @returns {Promise<Array<import("@vcmap-cesium/engine").Cartographic>>}
|
|
133
133
|
* @private
|
|
134
134
|
*/
|
|
135
135
|
_limitMostDetailed(cameraCartographic) {
|
|
@@ -137,7 +137,7 @@ class CameraLimiter {
|
|
|
137
137
|
}
|
|
138
138
|
|
|
139
139
|
/**
|
|
140
|
-
* @param {import("@vcmap/
|
|
140
|
+
* @param {import("@vcmap-cesium/engine").Cartographic} cameraCartographic
|
|
141
141
|
* @returns {Promise<void>}
|
|
142
142
|
* @private
|
|
143
143
|
*/
|
|
@@ -156,7 +156,7 @@ class CameraLimiter {
|
|
|
156
156
|
|
|
157
157
|
/**
|
|
158
158
|
* Limits the given camera based on this limiters specs.
|
|
159
|
-
* @param {import("@vcmap/
|
|
159
|
+
* @param {import("@vcmap-cesium/engine").Camera} camera
|
|
160
160
|
* @api
|
|
161
161
|
* @returns {Promise<void>}
|
|
162
162
|
*/
|