@vcmap/core 5.0.2 → 5.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cesium.d.ts +257 -0
- package/dist/index.d.ts +3 -0
- package/dist/ol.d.ts +138 -0
- package/package.json +2 -1
package/dist/cesium.d.ts
ADDED
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Type overrides for types extended by the @vcmap/core API
|
|
3
|
+
*/
|
|
4
|
+
// eslint-disable-next-line max-classes-per-file
|
|
5
|
+
import {
|
|
6
|
+
Cartesian2,
|
|
7
|
+
Cartesian3,
|
|
8
|
+
Cartesian4,
|
|
9
|
+
Color,
|
|
10
|
+
} from '@vcmap-cesium/engine';
|
|
11
|
+
import { StyleLike } from 'ol/style/Style.js';
|
|
12
|
+
import VectorStyleItem from './src/style/vectorStyleItem.js';
|
|
13
|
+
import { scaleSymbol } from './src/layer/cesium/vectorContext.js';
|
|
14
|
+
import { vcsLayerName } from './src/layer/layerSymbols.js';
|
|
15
|
+
import {
|
|
16
|
+
globalHidden,
|
|
17
|
+
hidden,
|
|
18
|
+
highlighted,
|
|
19
|
+
originalStyle,
|
|
20
|
+
} from './src/layer/featureVisibility.js';
|
|
21
|
+
import { handlerSymbol } from './src/util/editor/editorSymbols.js';
|
|
22
|
+
import { AxisAndPlanes } from './src/util/editor/transformation/transformationTypes.js';
|
|
23
|
+
import {
|
|
24
|
+
cesiumTilesetLastUpdated,
|
|
25
|
+
updateFeatureOverride,
|
|
26
|
+
} from './src/layer/cesium/cesiumTilesetCesiumImpl.js';
|
|
27
|
+
import { isTiledFeature } from './src/layer/featureStoreLayer.js';
|
|
28
|
+
|
|
29
|
+
declare module '@vcmap-cesium/engine' {
|
|
30
|
+
interface Scene {
|
|
31
|
+
render(): void;
|
|
32
|
+
frameState: FrameState;
|
|
33
|
+
context: Context;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
interface TileBoundingVolume {
|
|
37
|
+
boundingVolume?: object;
|
|
38
|
+
boundingSphere?: BoundingSphere;
|
|
39
|
+
rectangle?: Rectangle;
|
|
40
|
+
distanceToCamera(frameState: object): number;
|
|
41
|
+
intersectPlane(plane: Plane): Intersect;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
interface Entity {
|
|
45
|
+
allowPicking?: boolean;
|
|
46
|
+
attributes?: Record<string, unknown>;
|
|
47
|
+
olFeature?: import('ol').Feature<import('ol/geom.js').Geometry>;
|
|
48
|
+
getId(): number | string;
|
|
49
|
+
getProperty(key: string): any;
|
|
50
|
+
getPropertyInherited(key: string): any;
|
|
51
|
+
[vcsLayerName]?: string;
|
|
52
|
+
[globalHidden]?: boolean;
|
|
53
|
+
[hidden]?: boolean;
|
|
54
|
+
[highlighted]?: VectorStyleItem;
|
|
55
|
+
[originalStyle]?: StyleLike | Color;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
interface Primitive {
|
|
59
|
+
olFeature?: import('ol').Feature<import('ol/geom.js').Geometry>;
|
|
60
|
+
[handlerSymbol]?: AxisAndPlanes;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
interface Model {
|
|
64
|
+
olFeature?: import('ol').Feature<import('ol/geom.js').Geometry>;
|
|
65
|
+
[scaleSymbol]?: number;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
interface GroundPrimitive {
|
|
69
|
+
olFeature?: import('ol').Feature<import('ol/geom.js').Geometry>;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
interface GroundPolylinePrimitive {
|
|
73
|
+
olFeature?: import('ol').Feature<import('ol/geom.js').Geometry>;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
interface ClassificationPrimitive {
|
|
77
|
+
olFeature?: import('ol').Feature<import('ol/geom.js').Geometry>;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
interface Label {
|
|
81
|
+
olFeature?: import('ol').Feature<import('ol/geom.js').Geometry>;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
interface Billboard {
|
|
85
|
+
olFeature?: import('ol').Feature<import('ol/geom.js').Geometry>;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
interface ImageryProvider {
|
|
89
|
+
_reload?(): void;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
interface PrimitiveCollection {
|
|
93
|
+
VCMLayerIndex?: number;
|
|
94
|
+
[vcsLayerName]?: string;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
interface CustomDataSource {
|
|
98
|
+
[vcsLayerName]?: string;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
interface CzmlDataSource {
|
|
102
|
+
[vcsLayerName]?: string;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
interface DataSource {
|
|
106
|
+
[vcsLayerName]?: string;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
interface ImageryLayer {
|
|
110
|
+
VCMLayerIndex?: number;
|
|
111
|
+
[vcsLayerName]?: string;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
interface TerrainProvider {
|
|
115
|
+
[vcsLayerName]?: string;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
interface Cesium3DTile {
|
|
119
|
+
boundingVolume: TileBoundingVolume;
|
|
120
|
+
contentReady: boolean;
|
|
121
|
+
[cesiumTilesetLastUpdated]?: number;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
interface Cesium3DTileContent {
|
|
125
|
+
readonly batchTable: Cesium3DTileBatchTable;
|
|
126
|
+
isDestroyed(): boolean;
|
|
127
|
+
[cesiumTilesetLastUpdated]?: number;
|
|
128
|
+
[updateFeatureOverride]?: () => void;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
interface Cesium3DTileset {
|
|
132
|
+
clippingPlanesOriginMatrix: Matrix4;
|
|
133
|
+
[vcsLayerName]: string;
|
|
134
|
+
[isTiledFeature]?: boolean;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
interface CesiumTerrainProvider {
|
|
138
|
+
[vcsLayerName]?: string;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
interface DataSourceDisplay {
|
|
142
|
+
getBoundingSphere(
|
|
143
|
+
entity: Entity,
|
|
144
|
+
allowPartial: boolean,
|
|
145
|
+
result: BoundingSphere,
|
|
146
|
+
): BoundingSphereState;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
interface Cesium3DTileFeature {
|
|
150
|
+
content: Cesium3DTileContent;
|
|
151
|
+
_batchId: number;
|
|
152
|
+
getId(): number | string;
|
|
153
|
+
[vcsLayerName]?: string;
|
|
154
|
+
[globalHidden]?: boolean;
|
|
155
|
+
[hidden]?: boolean;
|
|
156
|
+
[highlighted]?: VectorStyleItem;
|
|
157
|
+
[originalStyle]?: StyleLike | Color;
|
|
158
|
+
[isTiledFeature]?: boolean;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
interface Cesium3DTilePointFeature {
|
|
162
|
+
content: Cesium3DTileContent;
|
|
163
|
+
_batchId: number;
|
|
164
|
+
getId(): number | string;
|
|
165
|
+
[vcsLayerName]?: string;
|
|
166
|
+
[globalHidden]?: boolean;
|
|
167
|
+
[hidden]?: boolean;
|
|
168
|
+
[highlighted]?: VectorStyleItem;
|
|
169
|
+
[originalStyle]?: StyleLike | Color;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
interface Cesium3DTileStyle {
|
|
173
|
+
strokeColor: StyleExpression;
|
|
174
|
+
strokeWidth: StyleExpression;
|
|
175
|
+
scale: StyleExpression;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
interface StyleExpression {
|
|
179
|
+
evaluate<
|
|
180
|
+
T extends
|
|
181
|
+
| boolean
|
|
182
|
+
| number
|
|
183
|
+
| string
|
|
184
|
+
| RegExp
|
|
185
|
+
| Cartesian2
|
|
186
|
+
| Cartesian3
|
|
187
|
+
| Cartesian4
|
|
188
|
+
| Color = string,
|
|
189
|
+
>(
|
|
190
|
+
feature:
|
|
191
|
+
| Cesium3DTileFeature
|
|
192
|
+
| import('ol/Feature.js').default<
|
|
193
|
+
import('ol/geom/Geometry.js').default
|
|
194
|
+
>,
|
|
195
|
+
result?: any,
|
|
196
|
+
): T | undefined;
|
|
197
|
+
evaluateColor(
|
|
198
|
+
feature:
|
|
199
|
+
| Cesium3DTileFeature
|
|
200
|
+
| import('ol/Feature.js').default<
|
|
201
|
+
import('ol/geom/Geometry.js').default
|
|
202
|
+
>,
|
|
203
|
+
result?: Color,
|
|
204
|
+
): Color;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
interface Expression {
|
|
208
|
+
evaluate(
|
|
209
|
+
feature:
|
|
210
|
+
| Cesium3DTileFeature
|
|
211
|
+
| import('ol/Feature.js').default<
|
|
212
|
+
import('ol/geom/Geometry.js').default
|
|
213
|
+
>,
|
|
214
|
+
result?: any,
|
|
215
|
+
): any;
|
|
216
|
+
evaluateColor(
|
|
217
|
+
feature:
|
|
218
|
+
| Cesium3DTileFeature
|
|
219
|
+
| import('ol/Feature.js').default<
|
|
220
|
+
import('ol/geom/Geometry.js').default
|
|
221
|
+
>,
|
|
222
|
+
result?: Color,
|
|
223
|
+
): Color;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
interface ShadowMap {
|
|
227
|
+
viewshed?: {
|
|
228
|
+
shadowColor?: Color;
|
|
229
|
+
visibleColor?: Color;
|
|
230
|
+
distance?: number;
|
|
231
|
+
};
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
interface ScreenSpaceEventHandler {
|
|
235
|
+
_positions: Cartesian2[];
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
export class Cesium3DTileBatchTable {
|
|
239
|
+
isDestroyed(): boolean;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
class Context {
|
|
243
|
+
fragmentDepth: boolean;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
class FrameState {
|
|
247
|
+
context: Context;
|
|
248
|
+
|
|
249
|
+
creditDisplay: CreditDisplay;
|
|
250
|
+
|
|
251
|
+
frameNumber: number;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
export namespace PolygonPipeline {
|
|
255
|
+
function triangulate(positions: Cartesian2[], holes?: number[]): number[];
|
|
256
|
+
}
|
|
257
|
+
}
|
package/dist/index.d.ts
CHANGED
|
@@ -174,3 +174,6 @@ export { volatileModuleId, markVolatile, default as VcsModule, VcsModuleConfig,
|
|
|
174
174
|
export { deserializeMap, deserializeViewpoint, deserializeLayer, serializeLayer, getLayerIndex, destroyCollection, ModuleLayerOptions, } from './src/vcsModuleHelpers.js';
|
|
175
175
|
export { default as VcsObject, VcsObjectOptions } from './src/vcsObject.js';
|
|
176
176
|
export { moduleIdSymbol } from './src/moduleIdSymbol.js';
|
|
177
|
+
import './cesium.d.ts';
|
|
178
|
+
import './ol.d.ts';import './cesium.d.ts';
|
|
179
|
+
import './ol.d.ts';
|
package/dist/ol.d.ts
ADDED
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Type overrides for types extended by the @vcmap/core API
|
|
3
|
+
*/
|
|
4
|
+
import * as geom from 'ol/geom.js';
|
|
5
|
+
import * as style from 'ol/style.js';
|
|
6
|
+
|
|
7
|
+
import { Feature } from 'ol/index.js';
|
|
8
|
+
import CanvasImmediateRenderer from 'ol/render/canvas/Immediate.js';
|
|
9
|
+
import { Color } from '@vcmap-cesium/engine';
|
|
10
|
+
import { StyleLike } from 'ol/style/Style.js';
|
|
11
|
+
import VectorStyleItem, {
|
|
12
|
+
vectorStyleSymbol,
|
|
13
|
+
} from './src/style/vectorStyleItem.js';
|
|
14
|
+
import { ArcStruct, featureArcStruct } from './src/style/arcStyle.js';
|
|
15
|
+
import {
|
|
16
|
+
actuallyIsCircle,
|
|
17
|
+
alreadyTransformedToImage,
|
|
18
|
+
alreadyTransformedToMercator,
|
|
19
|
+
createSync,
|
|
20
|
+
doNotTransform,
|
|
21
|
+
obliqueGeometry,
|
|
22
|
+
originalFeatureSymbol,
|
|
23
|
+
} from './src/layer/vectorSymbols.js';
|
|
24
|
+
import { vcsLayerName } from './src/layer/layerSymbols.js';
|
|
25
|
+
import { isProvidedFeature } from './src/featureProvider/featureProviderSymbols.js';
|
|
26
|
+
import {
|
|
27
|
+
globalHidden,
|
|
28
|
+
hidden,
|
|
29
|
+
highlighted,
|
|
30
|
+
originalStyle,
|
|
31
|
+
} from './src/layer/featureVisibility.js';
|
|
32
|
+
import {
|
|
33
|
+
FeatureStoreLayerState,
|
|
34
|
+
featureStoreStateSymbol,
|
|
35
|
+
} from './src/layer/featureStoreLayerState.js';
|
|
36
|
+
import { isTiledFeature } from './src/layer/featureStoreLayer.js';
|
|
37
|
+
import { featureFromOptions } from './src/layer/geojsonLayer.js';
|
|
38
|
+
import { handlerSymbol, vertexSymbol } from './src/util/editor/editorSymbols.js';
|
|
39
|
+
import { AxisAndPlanes } from './src/util/editor/transformation/transformationTypes.js';
|
|
40
|
+
import {
|
|
41
|
+
fvLastUpdated,
|
|
42
|
+
globalHiderLastUpdated,
|
|
43
|
+
} from './src/layer/vectorHelpers.js';
|
|
44
|
+
|
|
45
|
+
declare module 'ol/geom.js' {
|
|
46
|
+
interface Geometry {
|
|
47
|
+
getCoordinates(): any;
|
|
48
|
+
setCoordinates(coordinates: any, layout?: any): void;
|
|
49
|
+
getFlatCoordinates(): number[];
|
|
50
|
+
getLayout(): import('ol/geom/Geometry.js').GeometryLayout;
|
|
51
|
+
[alreadyTransformedToMercator]?: boolean;
|
|
52
|
+
[actuallyIsCircle]?: boolean;
|
|
53
|
+
[alreadyTransformedToImage]?: boolean;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
interface GeometryCollection {
|
|
57
|
+
getCoordinates(): Array<
|
|
58
|
+
| import('ol/coordinate.js').Coordinate
|
|
59
|
+
| Array<import('ol/coordinate.js').Coordinate>
|
|
60
|
+
| Array<Array<import('ol/coordinate.js').Coordinate>>
|
|
61
|
+
| Array<Array<Array<import('ol/coordinate.js').Coordinate>>>
|
|
62
|
+
>;
|
|
63
|
+
setCoordinates(
|
|
64
|
+
coordinates: Array<
|
|
65
|
+
| import('ol/coordinate.js').Coordinate
|
|
66
|
+
| Array<import('ol/coordinate.js').Coordinate>
|
|
67
|
+
| Array<Array<import('ol/coordinate.js').Coordinate>>
|
|
68
|
+
| Array<Array<Array<import('ol/coordinate.js').Coordinate>>>
|
|
69
|
+
>,
|
|
70
|
+
): void;
|
|
71
|
+
getLayout(): import('ol/geom/Geometry.js').GeometryLayout;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
interface Circle {
|
|
75
|
+
getCoordinates(): import('ol/coordinate.js').Coordinate[];
|
|
76
|
+
setCoordinates(coordinates: import('ol/coordinate.js').Coordinate[]): void;
|
|
77
|
+
rotate(angle: number, anchor: import('ol/coordinate.js').Coordinate): void;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
declare module 'ol/index.js' {
|
|
82
|
+
interface Feature<Geometry> {
|
|
83
|
+
getProperty(key: string): any;
|
|
84
|
+
getPropertyInherited(key: string): any;
|
|
85
|
+
[vcsLayerName]?: string;
|
|
86
|
+
[originalFeatureSymbol]?: Feature<Geometry>;
|
|
87
|
+
[vectorStyleSymbol]?: VectorStyleItem;
|
|
88
|
+
[featureArcStruct]?: ArcStruct;
|
|
89
|
+
[isProvidedFeature]?: boolean;
|
|
90
|
+
[globalHidden]?: boolean;
|
|
91
|
+
[hidden]?: boolean;
|
|
92
|
+
[highlighted]?: VectorStyleItem;
|
|
93
|
+
[originalStyle]?: StyleLike | Color;
|
|
94
|
+
[featureStoreStateSymbol]?: FeatureStoreLayerState;
|
|
95
|
+
[isTiledFeature]?: boolean;
|
|
96
|
+
[featureFromOptions]?: boolean;
|
|
97
|
+
[obliqueGeometry]?: Geometry;
|
|
98
|
+
[doNotTransform]?: boolean;
|
|
99
|
+
[handlerSymbol]?: AxisAndPlanes;
|
|
100
|
+
[vertexSymbol]?: boolean;
|
|
101
|
+
[createSync]?: boolean;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
class CanvasTileRenderer extends CanvasImmediateRenderer {
|
|
105
|
+
constructor(
|
|
106
|
+
context: CanvasRenderingContext2D,
|
|
107
|
+
pixelRation: number,
|
|
108
|
+
extent: import('ol/extent.js').Extent,
|
|
109
|
+
transform: import('ol/transform.js').Transform,
|
|
110
|
+
viewRotation: number,
|
|
111
|
+
squaredTolerance?: number,
|
|
112
|
+
userTransform?: import('ol/proj.js').TransformFunction,
|
|
113
|
+
scaleY?: number,
|
|
114
|
+
);
|
|
115
|
+
drawCircle(geometry: import('ol/geom/Circle.js').default): void;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
declare module 'ol/style.js' {
|
|
120
|
+
interface Fill {
|
|
121
|
+
fallBackColor:
|
|
122
|
+
| import('ol/colorlike.js').ColorLike
|
|
123
|
+
| import('ol/color.js').Color;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
declare module 'ol/layer.js' {
|
|
128
|
+
interface Layer {
|
|
129
|
+
[vcsLayerName]: string;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
declare module 'ol/source.js' {
|
|
134
|
+
interface Vector {
|
|
135
|
+
[fvLastUpdated]?: number;
|
|
136
|
+
[globalHiderLastUpdated]?: number;
|
|
137
|
+
}
|
|
138
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vcmap/core",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.3",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
"coverage:gitlab": "c8 --reporter text-summary npm run test -- --reporter mocha-junit-reporter",
|
|
18
18
|
"build-docs": "typedoc index.ts --out docs --skipErrorChecking",
|
|
19
19
|
"build": "tsc && node -e \"require('fs').cpSync('tests/data', 'dist/tests/data', { recursive: true })\"",
|
|
20
|
+
"postbuild": "node build/postBuild.js",
|
|
20
21
|
"watch": "tsc --watch",
|
|
21
22
|
"prepare": "npm run build"
|
|
22
23
|
},
|