@vcmap/core 6.0.0-rc.1 → 6.0.0-rc.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/src/cesium/cesiumVcsCameraPrimitive.d.ts +1 -0
- package/dist/src/cesium/cesiumVcsCameraPrimitive.js +4 -0
- package/dist/src/cesium/cesiumVcsCameraPrimitive.js.map +1 -1
- package/dist/src/featureProvider/wmsFeatureProvider.js.map +1 -1
- package/dist/src/layer/featureVisibility.js +3 -4
- package/dist/src/layer/featureVisibility.js.map +1 -1
- package/dist/src/layer/oblique/vectorObliqueImpl.d.ts +3 -3
- package/dist/src/layer/oblique/vectorObliqueImpl.js.map +1 -1
- package/dist/src/layer/openlayers/vectorOpenlayersImpl.d.ts +2 -2
- package/dist/src/layer/openlayers/vectorOpenlayersImpl.js.map +1 -1
- package/dist/src/layer/openlayers/vectorTileOpenlayersImpl.js +15 -12
- package/dist/src/layer/openlayers/vectorTileOpenlayersImpl.js.map +1 -1
- package/dist/src/layer/tileProvider/mvtTileProvider.js.map +1 -1
- package/dist/src/layer/wfsLayer.js +4 -0
- package/dist/src/layer/wfsLayer.js.map +1 -1
- package/dist/src/oblique/obliqueDataSet.js +1 -1
- package/dist/src/oblique/obliqueDataSet.js.map +1 -1
- package/dist/src/style/arrowStyle.js +5 -5
- package/dist/src/style/arrowStyle.js.map +1 -1
- package/dist/src/style/declarativeStyleItem.js.map +1 -1
- package/dist/src/style/styleHelpers.js +3 -1
- package/dist/src/style/styleHelpers.js.map +1 -1
- package/dist/src/style/vectorStyleItem.js +8 -8
- package/dist/src/style/vectorStyleItem.js.map +1 -1
- package/dist/src/util/featureconverter/circleToCesium.js +1 -1
- package/dist/src/util/featureconverter/circleToCesium.js.map +1 -1
- package/dist/src/util/featureconverter/featureconverterHelper.js +3 -2
- package/dist/src/util/featureconverter/featureconverterHelper.js.map +1 -1
- package/dist/src/util/featureconverter/lineStringToCesium.js.map +1 -1
- package/dist/src/util/featureconverter/pointHelpers.js +1 -1
- package/dist/src/util/featureconverter/pointHelpers.js.map +1 -1
- package/dist/src/util/featureconverter/pointToCesium.js +4 -3
- package/dist/src/util/featureconverter/pointToCesium.js.map +1 -1
- package/dist/src/util/featureconverter/polygonToCesium.js +1 -1
- package/dist/src/util/featureconverter/polygonToCesium.js.map +1 -1
- package/dist/src/util/overrideCollection.js +6 -1
- package/dist/src/util/overrideCollection.js.map +1 -1
- package/package.json +19 -19
- package/src/cesium/cesiumVcsCameraPrimitive.ts +5 -0
- package/src/featureProvider/wmsFeatureProvider.ts +1 -1
- package/src/layer/featureVisibility.ts +3 -6
- package/src/layer/oblique/vectorObliqueImpl.ts +2 -2
- package/src/layer/openlayers/vectorOpenlayersImpl.ts +2 -2
- package/src/layer/openlayers/vectorTileOpenlayersImpl.ts +21 -17
- package/src/layer/tileProvider/mvtTileProvider.ts +2 -2
- package/src/layer/wfsLayer.ts +4 -1
- package/src/oblique/obliqueDataSet.ts +1 -1
- package/src/style/arrowStyle.ts +7 -7
- package/src/style/declarativeStyleItem.ts +2 -2
- package/src/style/styleHelpers.ts +15 -13
- package/src/style/vectorStyleItem.ts +14 -14
- package/src/util/featureconverter/circleToCesium.ts +1 -1
- package/src/util/featureconverter/featureconverterHelper.ts +9 -5
- package/src/util/featureconverter/lineStringToCesium.ts +2 -2
- package/src/util/featureconverter/pointHelpers.ts +5 -1
- package/src/util/featureconverter/pointToCesium.ts +7 -3
- package/src/util/featureconverter/polygonToCesium.ts +1 -1
- package/src/util/overrideCollection.ts +6 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"overrideCollection.js","sourceRoot":"","sources":["../../../src/util/overrideCollection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AACvC,OAAO,EAAE,SAAS,IAAI,eAAe,EAAe,MAAM,iBAAiB,CAAC;AAC5E,OAAO,UAAU,MAAM,iBAAiB,CAAC;AACzC,OAAO,QAAQ,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AC,QAAQ,CAAC,OAAO,EAAE,CAAC;IACxC,CAAC,CAAC;IAEF,OAAO,kBAAkB,CAAC;AAC5B,CAAC;AAED,eAAe,sBAAsB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vcmap/core",
|
|
3
|
-
"version": "6.0.0-rc.
|
|
3
|
+
"version": "6.0.0-rc.3",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -38,35 +38,35 @@
|
|
|
38
38
|
"author": "Virtual City Systems",
|
|
39
39
|
"license": "MIT",
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@types/chai": "^4.3.
|
|
41
|
+
"@types/chai": "^4.3.16",
|
|
42
42
|
"@types/geojson": "^7946.0.10",
|
|
43
|
-
"@types/mocha": "^10.0.
|
|
44
|
-
"@types/node": "^
|
|
45
|
-
"@types/proj4": "^2.5.
|
|
43
|
+
"@types/mocha": "^10.0.7",
|
|
44
|
+
"@types/node": "^20.14.10",
|
|
45
|
+
"@types/proj4": "^2.5.5",
|
|
46
46
|
"@types/sinon": "^10.0.15",
|
|
47
47
|
"@types/sinon-chai": "^3.2.12",
|
|
48
|
-
"@types/uuid": "^
|
|
48
|
+
"@types/uuid": "^10.0.0",
|
|
49
49
|
"@vcsuite/eslint-config": "^3.0.5",
|
|
50
|
-
"c8": "^
|
|
50
|
+
"c8": "^10.1.2",
|
|
51
51
|
"canvas": "^2.11.2",
|
|
52
|
-
"chai": "^4.
|
|
52
|
+
"chai": "^4.4.1",
|
|
53
53
|
"eslint": "^8.38.0",
|
|
54
|
-
"jsdom": "^
|
|
54
|
+
"jsdom": "^24.1.0",
|
|
55
55
|
"jsdom-global": "^3.0.2",
|
|
56
|
-
"mocha": "^
|
|
57
|
-
"mocha-junit-reporter": "^2.
|
|
58
|
-
"nock": "^13.
|
|
59
|
-
"node-fetch": "^3.2
|
|
56
|
+
"mocha": "^10.0.0",
|
|
57
|
+
"mocha-junit-reporter": "^2.2.1",
|
|
58
|
+
"nock": "^13.5.4",
|
|
59
|
+
"node-fetch": "^3.3.2",
|
|
60
60
|
"prettier": "^3.0.3",
|
|
61
61
|
"resize-observer-polyfill": "^1.5.1",
|
|
62
62
|
"sinon": "^9.2.4",
|
|
63
63
|
"sinon-chai": "^3.6.0",
|
|
64
|
-
"typedoc": "^0.
|
|
64
|
+
"typedoc": "^0.26.4",
|
|
65
65
|
"typescript": "^5.0.4"
|
|
66
66
|
},
|
|
67
67
|
"peerDependencies": {
|
|
68
68
|
"@vcmap-cesium/engine": "^10.0.1",
|
|
69
|
-
"ol": "^
|
|
69
|
+
"ol": "^10.0.0"
|
|
70
70
|
},
|
|
71
71
|
"eslintConfig": {
|
|
72
72
|
"extends": [
|
|
@@ -115,9 +115,9 @@
|
|
|
115
115
|
"@vcsuite/logger": "^1.0.1",
|
|
116
116
|
"@vcsuite/parsers": "^1.0.3",
|
|
117
117
|
"fast-deep-equal": "^3.1.3",
|
|
118
|
-
"proj4": "^2.
|
|
119
|
-
"rbush": ">=
|
|
120
|
-
"rbush-knn": "^
|
|
121
|
-
"uuid": "^
|
|
118
|
+
"proj4": "^2.11.0",
|
|
119
|
+
"rbush": ">=4.0.0",
|
|
120
|
+
"rbush-knn": "^4.0.0",
|
|
121
|
+
"uuid": "^10.0.0"
|
|
122
122
|
}
|
|
123
123
|
}
|
|
@@ -156,6 +156,11 @@ class VcsCameraPrimitive {
|
|
|
156
156
|
}
|
|
157
157
|
}
|
|
158
158
|
|
|
159
|
+
// eslint-disable-next-line class-methods-use-this
|
|
160
|
+
isDestroyed(): boolean {
|
|
161
|
+
return false;
|
|
162
|
+
}
|
|
163
|
+
|
|
159
164
|
destroy(): void {
|
|
160
165
|
const { length } = this._planesPrimitives;
|
|
161
166
|
for (let i = 0; i < length; ++i) {
|
|
@@ -212,7 +212,7 @@ class WMSFeatureProvider extends AbstractFeatureProvider {
|
|
|
212
212
|
features = this.featureFormat!.readFeatures(data, {
|
|
213
213
|
dataProjection: this.projection ? this.projection.proj : undefined,
|
|
214
214
|
featureProjection: mercatorProjection.proj,
|
|
215
|
-
})
|
|
215
|
+
});
|
|
216
216
|
} catch (ex) {
|
|
217
217
|
this.getLogger().warning(
|
|
218
218
|
'Features could not be read, please verify the featureInfoResponseType with the capabilities from the server',
|
|
@@ -244,13 +244,10 @@ class FeatureVisibility {
|
|
|
244
244
|
usedStyle = fromCesiumColor(style);
|
|
245
245
|
} else if (style instanceof Style) {
|
|
246
246
|
usedStyle = new VectorStyleItem({});
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
style.getText().getText() &&
|
|
250
|
-
!Array.isArray(style.getText().getText())
|
|
251
|
-
) {
|
|
247
|
+
const text = style.getText()?.getText();
|
|
248
|
+
if (text && !Array.isArray(text)) {
|
|
252
249
|
// getText can return a rich Text string[] We do not support this at the moment.
|
|
253
|
-
usedStyle.label = String(
|
|
250
|
+
usedStyle.label = String(text);
|
|
254
251
|
}
|
|
255
252
|
usedStyle.style = style;
|
|
256
253
|
} else if (is(style, Function)) {
|
|
@@ -78,7 +78,7 @@ class VectorObliqueImpl
|
|
|
78
78
|
|
|
79
79
|
featureVisibility: FeatureVisibility;
|
|
80
80
|
|
|
81
|
-
olLayer: OLVectorLayer
|
|
81
|
+
olLayer: OLVectorLayer | null = null;
|
|
82
82
|
|
|
83
83
|
private _imageChangedListener: (() => void) | null | undefined = null;
|
|
84
84
|
|
|
@@ -91,7 +91,7 @@ class VectorObliqueImpl
|
|
|
91
91
|
this.featureVisibility = options.featureVisibility;
|
|
92
92
|
}
|
|
93
93
|
|
|
94
|
-
getOLLayer(): OLVectorLayer
|
|
94
|
+
getOLLayer(): OLVectorLayer {
|
|
95
95
|
return new OLVectorLayer({
|
|
96
96
|
visible: false,
|
|
97
97
|
source: this.obliqueSource,
|
|
@@ -32,7 +32,7 @@ class VectorOpenlayersImpl
|
|
|
32
32
|
|
|
33
33
|
private _featureVisibilityListeners: (() => void)[] = [];
|
|
34
34
|
|
|
35
|
-
olLayer: OLVectorLayer
|
|
35
|
+
olLayer: OLVectorLayer | null = null;
|
|
36
36
|
|
|
37
37
|
globalHider: GlobalHider;
|
|
38
38
|
|
|
@@ -54,7 +54,7 @@ class VectorOpenlayersImpl
|
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
-
getOLLayer(): OLVectorLayer
|
|
57
|
+
getOLLayer(): OLVectorLayer {
|
|
58
58
|
const olLayer = new OLVectorLayer({
|
|
59
59
|
visible: false,
|
|
60
60
|
source: this.source,
|
|
@@ -3,6 +3,7 @@ import VectorTileSource from 'ol/source/VectorTile.js';
|
|
|
3
3
|
import TileState from 'ol/TileState.js';
|
|
4
4
|
import type { Size } from 'ol/size.js';
|
|
5
5
|
import type VectorTile from 'ol/VectorTile.js';
|
|
6
|
+
import { Feature } from 'ol';
|
|
6
7
|
import LayerOpenlayersImpl from './layerOpenlayersImpl.js';
|
|
7
8
|
import { mercatorProjection } from '../../util/projection.js';
|
|
8
9
|
import type {
|
|
@@ -62,22 +63,25 @@ class VectorTileOpenlayersImpl
|
|
|
62
63
|
minZoom: 0,
|
|
63
64
|
maxZoom: 26,
|
|
64
65
|
tileSize: this.tileSize,
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
66
|
+
tileLoadFunction: (tile): void => {
|
|
67
|
+
this.tileProvider
|
|
68
|
+
.getFeaturesForTile(
|
|
69
|
+
tile.tileCoord[1],
|
|
70
|
+
tile.tileCoord[2],
|
|
71
|
+
tile.tileCoord[0],
|
|
72
|
+
this.headers,
|
|
73
|
+
)
|
|
74
|
+
.then((features) => {
|
|
75
|
+
if (features.length > 0) {
|
|
76
|
+
(tile as VectorTile<Feature>).setFeatures(features);
|
|
77
|
+
} else {
|
|
78
|
+
(tile as VectorTile<Feature>).setFeatures([]);
|
|
79
|
+
tile.setState(TileState.EMPTY);
|
|
80
|
+
}
|
|
81
|
+
})
|
|
82
|
+
.catch((err) => {
|
|
83
|
+
this.getLogger().error((err as Error).message);
|
|
84
|
+
});
|
|
81
85
|
},
|
|
82
86
|
// url needs to be set for the tileLoadFunction to work.
|
|
83
87
|
url: '/{z}/{x}/{y}',
|
|
@@ -120,7 +124,7 @@ class VectorTileOpenlayersImpl
|
|
|
120
124
|
const tCache = this.source.tileCache;
|
|
121
125
|
if (tCache.containsKey(tileId)) {
|
|
122
126
|
// change of key of tile (will trigger a reload)
|
|
123
|
-
const tile = tCache.get(tileId) as VectorTile
|
|
127
|
+
const tile = tCache.get(tileId) as VectorTile<Feature>;
|
|
124
128
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
125
129
|
// @ts-ignore
|
|
126
130
|
tile.key = false;
|
|
@@ -41,7 +41,7 @@ class MVTTileProvider extends TileProvider {
|
|
|
41
41
|
|
|
42
42
|
idProperty: string | undefined;
|
|
43
43
|
|
|
44
|
-
private _MVTFormat = new MVT({ featureClass: Feature });
|
|
44
|
+
private _MVTFormat = new MVT<Feature>({ featureClass: Feature });
|
|
45
45
|
|
|
46
46
|
constructor(options: MVTTileProviderOptions) {
|
|
47
47
|
const defaultOptions = MVTTileProvider.getDefaultOptions();
|
|
@@ -80,7 +80,7 @@ class MVTTileProvider extends TileProvider {
|
|
|
80
80
|
const center = getCenter(extent);
|
|
81
81
|
const init = getInitForUrl(this.url, headers);
|
|
82
82
|
const data = await requestArrayBuffer(url, init);
|
|
83
|
-
const features = this._MVTFormat.readFeatures(data)
|
|
83
|
+
const features = this._MVTFormat.readFeatures(data);
|
|
84
84
|
const sx = (extent[2] - extent[0]) / 4096;
|
|
85
85
|
const sy = -((extent[3] - extent[1]) / 4096);
|
|
86
86
|
features.forEach((feature) => {
|
package/src/layer/wfsLayer.ts
CHANGED
|
@@ -156,13 +156,16 @@ class WFSLayer extends VectorLayer {
|
|
|
156
156
|
|
|
157
157
|
toJSON(): WFSOptions {
|
|
158
158
|
const config: Partial<WFSOptions> = super.toJSON();
|
|
159
|
-
|
|
159
|
+
const defaultOptions = WFSLayer.getDefaultOptions();
|
|
160
160
|
config.featureType = this.featureType.slice();
|
|
161
161
|
config.featureNS = this.featureNS;
|
|
162
162
|
config.featurePrefix = this.featurePrefix;
|
|
163
163
|
if (Object.keys(this.getFeaturesOptions).length > 0) {
|
|
164
164
|
config.getFeatureOptions = this.getFeaturesOptions;
|
|
165
165
|
}
|
|
166
|
+
if (this.version !== defaultOptions.version) {
|
|
167
|
+
config.version = this.version;
|
|
168
|
+
}
|
|
166
169
|
return config as WFSOptions;
|
|
167
170
|
}
|
|
168
171
|
}
|
|
@@ -207,7 +207,7 @@ class ObliqueDataSet {
|
|
|
207
207
|
let images: ObliqueImage[] = [];
|
|
208
208
|
if (version >= 3.5 || (version === 3.4 && buildNumber > 36)) {
|
|
209
209
|
images = parseImageData(json, this._imageMetas);
|
|
210
|
-
} else if (version >= 3.1 || version ===
|
|
210
|
+
} else if (version >= 3.1 || version === undefined) {
|
|
211
211
|
images = parseLegacyImageData(json, this._imageMetas);
|
|
212
212
|
}
|
|
213
213
|
if (images.length > 0) {
|
package/src/style/arrowStyle.ts
CHANGED
|
@@ -189,22 +189,22 @@ class ArrowStyle extends Style {
|
|
|
189
189
|
* Same as getStroke().getWidth() / getStroke().setWidth()
|
|
190
190
|
*/
|
|
191
191
|
get width(): number | undefined {
|
|
192
|
-
return this.getStroke()
|
|
192
|
+
return this.getStroke()?.getWidth();
|
|
193
193
|
}
|
|
194
194
|
|
|
195
195
|
set width(width: number | undefined) {
|
|
196
|
-
this.getStroke()
|
|
196
|
+
this.getStroke()?.setWidth(width);
|
|
197
197
|
}
|
|
198
198
|
|
|
199
199
|
/**
|
|
200
200
|
* The color of the stroke and icon styles. Setting the color will not re-apply the icons color.
|
|
201
201
|
*/
|
|
202
202
|
get color(): ColorType {
|
|
203
|
-
return this.getStroke()
|
|
203
|
+
return this.getStroke()?.getColor() ?? [255, 255, 255, 1];
|
|
204
204
|
}
|
|
205
205
|
|
|
206
206
|
set color(color: ColorType) {
|
|
207
|
-
this.getStroke()
|
|
207
|
+
this.getStroke()?.setColor(color);
|
|
208
208
|
}
|
|
209
209
|
|
|
210
210
|
private _drawArrow(
|
|
@@ -214,7 +214,7 @@ class ArrowStyle extends Style {
|
|
|
214
214
|
pixelRatio: number,
|
|
215
215
|
): void {
|
|
216
216
|
ctx.save();
|
|
217
|
-
let scale = this.getImage()
|
|
217
|
+
let scale = this.getImage()?.getScale() ?? 1;
|
|
218
218
|
scale = Array.isArray(scale) ? scale : [scale, scale];
|
|
219
219
|
ctx.setTransform(
|
|
220
220
|
scale[0],
|
|
@@ -225,7 +225,7 @@ class ArrowStyle extends Style {
|
|
|
225
225
|
imagePosition[1],
|
|
226
226
|
);
|
|
227
227
|
ctx.rotate(Math.PI - rotation);
|
|
228
|
-
const image = this.getImage()
|
|
228
|
+
const image = this.getImage()!.getImage(pixelRatio);
|
|
229
229
|
ctx.translate(0, Math.floor(image.height / 2));
|
|
230
230
|
ctx.drawImage(image, -image.width / 2, -image.height / 2);
|
|
231
231
|
ctx.restore();
|
|
@@ -290,7 +290,7 @@ class ArrowStyle extends Style {
|
|
|
290
290
|
return {
|
|
291
291
|
color: this.color,
|
|
292
292
|
width: this.width,
|
|
293
|
-
arrowIcon: this.getImage()
|
|
293
|
+
arrowIcon: this.getImage()!.clone(),
|
|
294
294
|
zIndex: this.getZIndex(),
|
|
295
295
|
};
|
|
296
296
|
}
|
|
@@ -276,7 +276,7 @@ class DeclarativeStyleItem extends StyleItem {
|
|
|
276
276
|
scratchColor,
|
|
277
277
|
);
|
|
278
278
|
if (textColor) {
|
|
279
|
-
textStyle.getFill()
|
|
279
|
+
textStyle.getFill()!.setColor(cesiumColorToColor(textColor));
|
|
280
280
|
}
|
|
281
281
|
}
|
|
282
282
|
if (this.cesiumStyle.labelOutlineColor) {
|
|
@@ -364,7 +364,7 @@ class DeclarativeStyleItem extends StyleItem {
|
|
|
364
364
|
if (this.cesiumStyle.scale && style.getImage()) {
|
|
365
365
|
const scale = this.cesiumStyle.scale.evaluate<number>(feature);
|
|
366
366
|
if (scale && Number.isFinite(scale)) {
|
|
367
|
-
style.getImage()
|
|
367
|
+
style.getImage()!.setScale(scale);
|
|
368
368
|
}
|
|
369
369
|
}
|
|
370
370
|
|
|
@@ -401,8 +401,8 @@ export function getStrokeOptions(stroke: Stroke): StrokeOptions {
|
|
|
401
401
|
export function getTextOptions(text: OLText): VectorStyleItemText {
|
|
402
402
|
return {
|
|
403
403
|
font: text.getFont(),
|
|
404
|
-
fill: text.getFill() ? getFillOptions(text.getFill()) : undefined,
|
|
405
|
-
stroke: text.getStroke() ? getStrokeOptions(text.getStroke()) : undefined,
|
|
404
|
+
fill: text.getFill() ? getFillOptions(text.getFill()!) : undefined,
|
|
405
|
+
stroke: text.getStroke() ? getStrokeOptions(text.getStroke()!) : undefined,
|
|
406
406
|
textBaseline: text.getTextBaseline(),
|
|
407
407
|
offsetY: text.getOffsetY(),
|
|
408
408
|
offsetX: text.getOffsetX(),
|
|
@@ -469,13 +469,13 @@ export function getImageStyleOptions(image: ImageStyle): ImageStyleOptions {
|
|
|
469
469
|
scale: image.getScale(),
|
|
470
470
|
};
|
|
471
471
|
if (image.getFill()) {
|
|
472
|
-
options.fill = getFillOptions(image.getFill());
|
|
472
|
+
options.fill = getFillOptions(image.getFill()!);
|
|
473
473
|
}
|
|
474
474
|
if (image.getRadius() != null) {
|
|
475
475
|
options.radius = image.getRadius();
|
|
476
476
|
}
|
|
477
477
|
if (image.getStroke()) {
|
|
478
|
-
options.stroke = getStrokeOptions(image.getStroke());
|
|
478
|
+
options.stroke = getStrokeOptions(image.getStroke()!);
|
|
479
479
|
}
|
|
480
480
|
return options;
|
|
481
481
|
} else if (image instanceof RegularShape) {
|
|
@@ -483,7 +483,7 @@ export function getImageStyleOptions(image: ImageStyle): ImageStyleOptions {
|
|
|
483
483
|
scale: image.getScale(),
|
|
484
484
|
};
|
|
485
485
|
if (image.getFill()) {
|
|
486
|
-
options.fill = getFillOptions(image.getFill());
|
|
486
|
+
options.fill = getFillOptions(image.getFill()!);
|
|
487
487
|
}
|
|
488
488
|
if (image.getPoints()) {
|
|
489
489
|
options.points = image.getPoints();
|
|
@@ -501,7 +501,7 @@ export function getImageStyleOptions(image: ImageStyle): ImageStyleOptions {
|
|
|
501
501
|
options.radius2 = image.getRadius2();
|
|
502
502
|
}
|
|
503
503
|
if (image.getStroke()) {
|
|
504
|
-
options.stroke = getStrokeOptions(image.getStroke());
|
|
504
|
+
options.stroke = getStrokeOptions(image.getStroke()!);
|
|
505
505
|
}
|
|
506
506
|
return options;
|
|
507
507
|
}
|
|
@@ -572,12 +572,14 @@ export function getStyleFromOptions(options: StyleOptions): Style {
|
|
|
572
572
|
|
|
573
573
|
export function getStyleOptions(style: Style): StyleOptions {
|
|
574
574
|
return {
|
|
575
|
-
fill: style.getFill() ? getFillOptions(style.getFill()) : undefined,
|
|
576
|
-
stroke: style.getStroke()
|
|
575
|
+
fill: style.getFill() ? getFillOptions(style.getFill()!) : undefined,
|
|
576
|
+
stroke: style.getStroke()
|
|
577
|
+
? getStrokeOptions(style.getStroke()!)
|
|
578
|
+
: undefined,
|
|
577
579
|
image: style.getImage()
|
|
578
|
-
? getImageStyleOptions(style.getImage())
|
|
580
|
+
? getImageStyleOptions(style.getImage()!)
|
|
579
581
|
: undefined,
|
|
580
|
-
text: style.getText() ? getTextOptions(style.getText()) : undefined,
|
|
582
|
+
text: style.getText() ? getTextOptions(style.getText()!) : undefined,
|
|
581
583
|
};
|
|
582
584
|
}
|
|
583
585
|
|
|
@@ -592,14 +594,14 @@ export function getCssStyleFromTextStyle(textStyle: OLText): {
|
|
|
592
594
|
color: undefined,
|
|
593
595
|
};
|
|
594
596
|
if (textStyle.getStroke()) {
|
|
595
|
-
let width = textStyle.getStroke()
|
|
597
|
+
let width = textStyle.getStroke()!.getWidth() as number;
|
|
596
598
|
width = width > 1 ? 1 : width;
|
|
597
|
-
const color = olColorToHex(parseColor(textStyle.getStroke()
|
|
599
|
+
const color = olColorToHex(parseColor(textStyle.getStroke()!.getColor()));
|
|
598
600
|
style.textShadow = `-${width}px ${width}px 0 ${color},${width}px ${width}px 0 ${color},${width}px -${width}px 0 ${color},-${width}px -${width}px 0 ${color}`;
|
|
599
601
|
}
|
|
600
602
|
if (textStyle.getFill()) {
|
|
601
603
|
style.color = olColorToHex(
|
|
602
|
-
parseColor(textStyle.getFill()
|
|
604
|
+
parseColor(textStyle.getFill()!.getColor() as ColorType),
|
|
603
605
|
);
|
|
604
606
|
}
|
|
605
607
|
return style;
|
|
@@ -261,7 +261,7 @@ class VectorStyleItem extends StyleItem {
|
|
|
261
261
|
options.image.radius = 5;
|
|
262
262
|
}
|
|
263
263
|
if ((options.image.fill as FillOptions)?.color) {
|
|
264
|
-
checkColor(options.image.fill as
|
|
264
|
+
checkColor(options.image.fill as { color: ColorType }); // XXX PatternDescriptor
|
|
265
265
|
}
|
|
266
266
|
if ((options.image.stroke as StrokeOptions)?.color) {
|
|
267
267
|
checkStroke(options.image.stroke as StrokeOptions);
|
|
@@ -418,10 +418,10 @@ class VectorStyleItem extends StyleItem {
|
|
|
418
418
|
set style(style: Style | StyleFunction) {
|
|
419
419
|
check(style, maybe(oneOf(Style, Function)));
|
|
420
420
|
if (style instanceof Style) {
|
|
421
|
-
this._stroke = style.getStroke();
|
|
422
|
-
this._fill = style.getFill();
|
|
423
|
-
this._text = style.getText();
|
|
424
|
-
this._image = style.getImage();
|
|
421
|
+
this._stroke = style.getStroke() ?? undefined;
|
|
422
|
+
this._fill = style.getFill() ?? undefined;
|
|
423
|
+
this._text = style.getText() ?? undefined;
|
|
424
|
+
this._image = style.getImage() ?? undefined;
|
|
425
425
|
} else {
|
|
426
426
|
this._stroke = undefined;
|
|
427
427
|
this._fill = undefined;
|
|
@@ -485,7 +485,7 @@ class VectorStyleItem extends StyleItem {
|
|
|
485
485
|
if (this._image instanceof Circle && this._image.getFill()) {
|
|
486
486
|
colorConditions.splice(1, 0, [
|
|
487
487
|
`\${olcs_geometryType}===${OlcsGeometryType.POINT}`,
|
|
488
|
-
getStringColor(this._image.getFill()
|
|
488
|
+
getStringColor(this._image.getFill()!.getColor() as OLColor),
|
|
489
489
|
]);
|
|
490
490
|
}
|
|
491
491
|
if (this.fillColor) {
|
|
@@ -538,13 +538,13 @@ class VectorStyleItem extends StyleItem {
|
|
|
538
538
|
const stroke = this._image.getStroke();
|
|
539
539
|
let size = this._image.getRadius() * 2;
|
|
540
540
|
if (stroke) {
|
|
541
|
-
if (this._image.getStroke()
|
|
541
|
+
if (this._image.getStroke()?.getColor()) {
|
|
542
542
|
pointOutlineColorConditions.splice(1, 1, [
|
|
543
543
|
'true',
|
|
544
|
-
getStringColor(this._image.getStroke()
|
|
544
|
+
getStringColor(this._image.getStroke()!.getColor()),
|
|
545
545
|
]);
|
|
546
546
|
}
|
|
547
|
-
const width = this._image.getStroke()
|
|
547
|
+
const width = this._image.getStroke()!.getWidth() as number;
|
|
548
548
|
pointOutlineWidthConditions.splice(1, 1, ['true', `${width}`]);
|
|
549
549
|
size -= width;
|
|
550
550
|
}
|
|
@@ -620,21 +620,21 @@ class VectorStyleItem extends StyleItem {
|
|
|
620
620
|
`'${String(this._text.getText())}'`,
|
|
621
621
|
]);
|
|
622
622
|
}
|
|
623
|
-
if (this._text.getFill()
|
|
623
|
+
if (this._text.getFill()?.getColor()) {
|
|
624
624
|
labelColorConditions.splice(1, 1, [
|
|
625
625
|
'true',
|
|
626
|
-
getStringColor(this._text.getFill()
|
|
626
|
+
getStringColor(this._text.getFill()!.getColor() as OLColor),
|
|
627
627
|
]);
|
|
628
628
|
}
|
|
629
629
|
|
|
630
|
-
if (this._text.getStroke()
|
|
630
|
+
if (this._text.getStroke()?.getColor()) {
|
|
631
631
|
labelOutlineColorConditions.splice(1, 1, [
|
|
632
632
|
'true',
|
|
633
|
-
getStringColor(this._text.getStroke()
|
|
633
|
+
getStringColor(this._text.getStroke()!.getColor()),
|
|
634
634
|
]);
|
|
635
635
|
labelOutlineWidthConditions.splice(1, 1, [
|
|
636
636
|
'true',
|
|
637
|
-
`${this._text.getStroke()
|
|
637
|
+
`${this._text.getStroke()!.getWidth() || 1.25}`,
|
|
638
638
|
]);
|
|
639
639
|
}
|
|
640
640
|
}
|
|
@@ -65,7 +65,7 @@ export function getLineGeometryOptions(
|
|
|
65
65
|
options: ConstructorParameters<typeof CircleGeometry>[0],
|
|
66
66
|
style: Style,
|
|
67
67
|
): { width: number; positions: Cartesian3[] } {
|
|
68
|
-
const width = parseNumber(style.getStroke()
|
|
68
|
+
const width = parseNumber(style.getStroke()?.getWidth(), 1.0);
|
|
69
69
|
const { center, radius } = options;
|
|
70
70
|
const cartographic = Cartographic.fromCartesian(center);
|
|
71
71
|
const wgs84Center = [
|
|
@@ -38,6 +38,7 @@ import type {
|
|
|
38
38
|
VectorHeightInfo,
|
|
39
39
|
} from '../../layer/vectorLayer.js';
|
|
40
40
|
import type { AsyncCesiumVectorContext } from '../../layer/cesium/vectorContext.js';
|
|
41
|
+
import { ColorType } from '../../style/vectorStyleItem.js';
|
|
41
42
|
|
|
42
43
|
export function getMaterialAppearance(
|
|
43
44
|
scene: Scene,
|
|
@@ -136,7 +137,10 @@ export function createPrimitive(
|
|
|
136
137
|
if (!ClassificationPrimitive.isSupported(scene)) {
|
|
137
138
|
return null;
|
|
138
139
|
}
|
|
139
|
-
const color = getCesiumColor(
|
|
140
|
+
const color = getCesiumColor(
|
|
141
|
+
style.getFill()!.getColor() as ColorType, // XXX PatternDescriptor
|
|
142
|
+
[0, 0, 0, 1],
|
|
143
|
+
);
|
|
140
144
|
primitive = createClassificationPrimitive(
|
|
141
145
|
options,
|
|
142
146
|
geometries,
|
|
@@ -151,7 +155,7 @@ export function createPrimitive(
|
|
|
151
155
|
}),
|
|
152
156
|
);
|
|
153
157
|
options.geometryInstances = instances;
|
|
154
|
-
const appearance = getMaterialAppearance(scene, style.getFill()
|
|
158
|
+
const appearance = getMaterialAppearance(scene, style.getFill()!, feature);
|
|
155
159
|
options.appearance = appearance;
|
|
156
160
|
if (groundPrimitive) {
|
|
157
161
|
if (!GroundPrimitive.isSupported(scene)) {
|
|
@@ -175,7 +179,7 @@ export function createOutlinePrimitive(
|
|
|
175
179
|
geometries: (PolygonGeometry | CircleGeometry | WallGeometry)[],
|
|
176
180
|
style: Style,
|
|
177
181
|
): Primitive {
|
|
178
|
-
const color = getCesiumColor(style.getStroke()
|
|
182
|
+
const color = getCesiumColor(style.getStroke()!.getColor(), [0, 0, 0, 1]);
|
|
179
183
|
const instances = geometries.map(
|
|
180
184
|
(geometry) =>
|
|
181
185
|
new GeometryInstance({
|
|
@@ -223,9 +227,9 @@ export function createLinePrimitive(
|
|
|
223
227
|
}),
|
|
224
228
|
);
|
|
225
229
|
|
|
226
|
-
const color = getCesiumColor(style.getStroke()
|
|
230
|
+
const color = getCesiumColor(style.getStroke()!.getColor(), [0, 0, 0, 1]);
|
|
227
231
|
let material;
|
|
228
|
-
if (style.getStroke()
|
|
232
|
+
if (style.getStroke()?.getLineDash()) {
|
|
229
233
|
material = Material.fromType('Stripe', {
|
|
230
234
|
horizontal: false,
|
|
231
235
|
repeat: 500,
|
|
@@ -171,7 +171,7 @@ export function createGroundLineGeometries(
|
|
|
171
171
|
options: LineGeometryOptions,
|
|
172
172
|
style: Style,
|
|
173
173
|
): GroundPolylineGeometry[] {
|
|
174
|
-
const width = parseNumber(style.getStroke()
|
|
174
|
+
const width = parseNumber(style.getStroke()!.getWidth(), 1.0);
|
|
175
175
|
return [
|
|
176
176
|
new GroundPolylineGeometry({
|
|
177
177
|
...options,
|
|
@@ -184,7 +184,7 @@ export function createLineGeometries(
|
|
|
184
184
|
options: LineGeometryOptions,
|
|
185
185
|
style: Style,
|
|
186
186
|
): PolylineGeometry[] {
|
|
187
|
-
const width = parseNumber(style.getStroke()
|
|
187
|
+
const width = parseNumber(style.getStroke()!.getWidth(), 1.0);
|
|
188
188
|
|
|
189
189
|
return [
|
|
190
190
|
new PolylineGeometry({
|
|
@@ -39,6 +39,7 @@ import VectorProperties, {
|
|
|
39
39
|
} from '../../layer/vectorProperties.js';
|
|
40
40
|
import { getCesiumColor } from '../../style/styleHelpers.js';
|
|
41
41
|
import ModelFill from '../../style/modelFill.js';
|
|
42
|
+
import { ColorType } from '../../style/vectorStyleItem.js';
|
|
42
43
|
|
|
43
44
|
function makeOffsetAutoScalePrimitive(
|
|
44
45
|
primitive: Primitive | Model,
|
|
@@ -295,7 +296,10 @@ export async function getPrimitiveOptions(
|
|
|
295
296
|
}
|
|
296
297
|
let fillColor: Color | undefined;
|
|
297
298
|
if (fill) {
|
|
298
|
-
fillColor = getCesiumColor(
|
|
299
|
+
fillColor = getCesiumColor(
|
|
300
|
+
fill.getColor() as ColorType,
|
|
301
|
+
[255, 255, 255, 0.4],
|
|
302
|
+
); // XXX PatternDescriptor;
|
|
299
303
|
}
|
|
300
304
|
let strokeColor: Color | undefined;
|
|
301
305
|
if (stroke) {
|