@vcmap/core 6.3.0-rc.2 → 6.3.0
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/README.md +24 -23
- package/build/postinstall.js +16 -2
- package/dist/index.d.ts +2 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/ol.d.ts +10 -1
- package/dist/src/featureProvider/abstractFeatureProvider.d.ts +8 -0
- package/dist/src/featureProvider/abstractFeatureProvider.js +10 -0
- package/dist/src/featureProvider/abstractFeatureProvider.js.map +1 -1
- package/dist/src/featureProvider/jsonAttributeProvider.d.ts +2 -1
- package/dist/src/featureProvider/jsonAttributeProvider.js +5 -2
- package/dist/src/featureProvider/jsonAttributeProvider.js.map +1 -1
- package/dist/src/featureProvider/mapboxFeatureProvider.d.ts +18 -0
- package/dist/src/featureProvider/mapboxFeatureProvider.js +49 -0
- package/dist/src/featureProvider/mapboxFeatureProvider.js.map +1 -0
- package/dist/src/featureProvider/wmsFeatureProvider.d.ts +11 -0
- package/dist/src/featureProvider/wmsFeatureProvider.js +19 -8
- package/dist/src/featureProvider/wmsFeatureProvider.js.map +1 -1
- package/dist/src/interaction/eventHandler.js +3 -1
- package/dist/src/interaction/eventHandler.js.map +1 -1
- package/dist/src/interaction/featureAtPixelInteraction.js +5 -0
- package/dist/src/interaction/featureAtPixelInteraction.js.map +1 -1
- package/dist/src/interaction/featureProviderInteraction.d.ts +10 -1
- package/dist/src/interaction/featureProviderInteraction.js +19 -3
- package/dist/src/interaction/featureProviderInteraction.js.map +1 -1
- package/dist/src/layer/cesium/mapboxStyleCesiumImpl.d.ts +25 -0
- package/dist/src/layer/cesium/mapboxStyleCesiumImpl.js +58 -0
- package/dist/src/layer/cesium/mapboxStyleCesiumImpl.js.map +1 -0
- package/dist/src/layer/cesium/mapboxStyleImageryProvider.d.ts +26 -0
- package/dist/src/layer/cesium/mapboxStyleImageryProvider.js +147 -0
- package/dist/src/layer/cesium/mapboxStyleImageryProvider.js.map +1 -0
- package/dist/src/layer/cesium/vectorTileImageryProvider.d.ts +1 -1
- package/dist/src/layer/cesium/vectorTileImageryProvider.js.map +1 -1
- package/dist/src/layer/i3sLayer.d.ts +2 -10
- package/dist/src/layer/i3sLayer.js +9 -8
- package/dist/src/layer/i3sLayer.js.map +1 -1
- package/dist/src/layer/mapboxStyleLayer.d.ts +55 -0
- package/dist/src/layer/mapboxStyleLayer.js +176 -0
- package/dist/src/layer/mapboxStyleLayer.js.map +1 -0
- package/dist/src/layer/openlayers/layerOpenlayersImpl.d.ts +3 -4
- package/dist/src/layer/openlayers/layerOpenlayersImpl.js +11 -3
- package/dist/src/layer/openlayers/layerOpenlayersImpl.js.map +1 -1
- package/dist/src/layer/openlayers/mapboxStyleOpenlayersImpl.d.ts +15 -0
- package/dist/src/layer/openlayers/mapboxStyleOpenlayersImpl.js +49 -0
- package/dist/src/layer/openlayers/mapboxStyleOpenlayersImpl.js.map +1 -0
- package/dist/src/map/baseCesiumMap.d.ts +17 -0
- package/dist/src/map/baseCesiumMap.js +36 -0
- package/dist/src/map/baseCesiumMap.js.map +1 -1
- package/dist/src/map/baseOLMap.d.ts +6 -4
- package/dist/src/map/baseOLMap.js +3 -2
- package/dist/src/map/baseOLMap.js.map +1 -1
- package/dist/src/map/cesiumMap.d.ts +3 -3
- package/dist/src/map/cesiumMap.js +2 -3
- package/dist/src/map/cesiumMap.js.map +1 -1
- package/dist/src/map/panoramaMap.d.ts +2 -2
- package/dist/src/map/panoramaMap.js +1 -2
- package/dist/src/map/panoramaMap.js.map +1 -1
- package/dist/src/map/vcsMap.d.ts +3 -3
- package/dist/src/map/vcsMap.js +11 -3
- package/dist/src/map/vcsMap.js.map +1 -1
- package/index.ts +2 -0
- package/package.json +4 -3
- package/src/featureProvider/abstractFeatureProvider.ts +12 -0
- package/src/featureProvider/jsonAttributeProvider.ts +10 -2
- package/src/featureProvider/mapboxFeatureProvider.ts +74 -0
- package/src/featureProvider/wmsFeatureProvider.ts +29 -8
- package/src/interaction/eventHandler.ts +3 -1
- package/src/interaction/featureAtPixelInteraction.ts +5 -0
- package/src/interaction/featureProviderInteraction.ts +37 -8
- package/src/layer/cesium/mapboxStyleCesiumImpl.ts +95 -0
- package/src/layer/cesium/mapboxStyleImageryProvider.ts +214 -0
- package/src/layer/cesium/vectorTileImageryProvider.ts +2 -1
- package/src/layer/i3sLayer.ts +12 -14
- package/src/layer/mapboxStyleLayer.ts +244 -0
- package/src/layer/openlayers/layerOpenlayersImpl.ts +21 -10
- package/src/layer/openlayers/mapboxStyleOpenlayersImpl.ts +68 -0
- package/src/map/baseCesiumMap.ts +57 -0
- package/src/map/baseOLMap.ts +16 -14
- package/src/map/cesiumMap.ts +7 -6
- package/src/map/panoramaMap.ts +3 -3
- package/src/map/vcsMap.ts +16 -10
- package/src/ol/ol.d.ts +10 -1
package/src/map/vcsMap.ts
CHANGED
|
@@ -3,9 +3,9 @@ import { getLogger as getLoggerByName } from '@vcsuite/logger';
|
|
|
3
3
|
import { parseBoolean } from '@vcsuite/parsers';
|
|
4
4
|
import { v4 as uuidv4 } from 'uuid';
|
|
5
5
|
import type { MapEvent as OLMapEvent } from 'ol';
|
|
6
|
-
import type
|
|
6
|
+
import type OLLayer from 'ol/layer/Layer.js';
|
|
7
|
+
import OLLayerGroup from 'ol/layer/Group.js';
|
|
7
8
|
import type { Coordinate } from 'ol/coordinate.js';
|
|
8
|
-
|
|
9
9
|
import { check, is, maybe, oneOf } from '@vcsuite/check';
|
|
10
10
|
import type { VcsObjectOptions } from '../vcsObject.js';
|
|
11
11
|
import VcsObject from '../vcsObject.js';
|
|
@@ -19,6 +19,7 @@ import type Viewpoint from '../util/viewpoint.js';
|
|
|
19
19
|
import type Layer from '../layer/layer.js';
|
|
20
20
|
import type { MapEvent } from '../interaction/abstractInteraction.js';
|
|
21
21
|
import type { DisableMapControlOptions } from '../util/mapCollection.js';
|
|
22
|
+
import type { OLLayerLike } from './baseOLMap.js';
|
|
22
23
|
import type VectorClusterGroup from '../vectorCluster/vectorClusterGroup.js';
|
|
23
24
|
import { vectorClusterGroupName } from '../vectorCluster/vectorClusterSymbols.js';
|
|
24
25
|
import type { CesiumVisualisationType } from './baseCesiumMap.js';
|
|
@@ -50,11 +51,11 @@ export type VcsMapOptions = VcsObjectOptions & {
|
|
|
50
51
|
layerTypes?: string[];
|
|
51
52
|
};
|
|
52
53
|
|
|
53
|
-
export type VisualisationType = CesiumVisualisationType |
|
|
54
|
+
export type VisualisationType = CesiumVisualisationType | OLLayerLike;
|
|
54
55
|
|
|
55
56
|
export type VcsMapRenderEvent<V extends VisualisationType> = {
|
|
56
57
|
map: VcsMap;
|
|
57
|
-
originalEvent: V extends
|
|
58
|
+
originalEvent: V extends OLLayerLike ? OLMapEvent : CesiumMapEvent;
|
|
58
59
|
};
|
|
59
60
|
|
|
60
61
|
/**
|
|
@@ -421,18 +422,23 @@ class VcsMap<
|
|
|
421
422
|
[vcsLayerName]?: string;
|
|
422
423
|
[vectorClusterGroupName]?: string;
|
|
423
424
|
} {
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
425
|
+
if (Object.hasOwn(item, vectorClusterGroupName)) {
|
|
426
|
+
if (item instanceof OLLayerGroup) {
|
|
427
|
+
return false;
|
|
428
|
+
} else {
|
|
429
|
+
const vectorCluster = (item as OLLayer)[vectorClusterGroupName];
|
|
430
|
+
if (vectorCluster) {
|
|
431
|
+
return this.layerCollection.vectorClusterGroups.hasKey(
|
|
432
|
+
vectorCluster,
|
|
433
|
+
) as boolean;
|
|
434
|
+
}
|
|
435
|
+
}
|
|
429
436
|
}
|
|
430
437
|
const layerName = item[vcsLayerName];
|
|
431
438
|
if (layerName == null) {
|
|
432
439
|
this.getLogger().warning('item is missing vcsLayerName symbol');
|
|
433
440
|
return false;
|
|
434
441
|
}
|
|
435
|
-
|
|
436
442
|
return this.layerCollection.hasKey(layerName) as boolean;
|
|
437
443
|
}
|
|
438
444
|
|
package/src/ol/ol.d.ts
CHANGED
|
@@ -26,7 +26,11 @@ import type {
|
|
|
26
26
|
panoramaFeature,
|
|
27
27
|
primitives,
|
|
28
28
|
} from '../layer/vectorSymbols.js';
|
|
29
|
-
import type {
|
|
29
|
+
import type {
|
|
30
|
+
allowPicking,
|
|
31
|
+
i3sData,
|
|
32
|
+
vcsLayerName,
|
|
33
|
+
} from '../layer/layerSymbols.js';
|
|
30
34
|
import type {
|
|
31
35
|
isProvidedFeature,
|
|
32
36
|
isProvidedClusterFeature,
|
|
@@ -164,8 +168,13 @@ declare module 'ol/style.js' {
|
|
|
164
168
|
declare module 'ol/layer.js' {
|
|
165
169
|
interface Layer {
|
|
166
170
|
[vcsLayerName]: string;
|
|
171
|
+
[allowPicking]?: boolean;
|
|
167
172
|
[vectorClusterGroupName]?: string;
|
|
168
173
|
}
|
|
174
|
+
|
|
175
|
+
interface Group {
|
|
176
|
+
[vcsLayerName]: string;
|
|
177
|
+
}
|
|
169
178
|
}
|
|
170
179
|
|
|
171
180
|
declare module 'ol/source.js' {
|