@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.
Files changed (58) hide show
  1. package/dist/src/cesium/cesiumVcsCameraPrimitive.d.ts +1 -0
  2. package/dist/src/cesium/cesiumVcsCameraPrimitive.js +4 -0
  3. package/dist/src/cesium/cesiumVcsCameraPrimitive.js.map +1 -1
  4. package/dist/src/featureProvider/wmsFeatureProvider.js.map +1 -1
  5. package/dist/src/layer/featureVisibility.js +3 -4
  6. package/dist/src/layer/featureVisibility.js.map +1 -1
  7. package/dist/src/layer/oblique/vectorObliqueImpl.d.ts +3 -3
  8. package/dist/src/layer/oblique/vectorObliqueImpl.js.map +1 -1
  9. package/dist/src/layer/openlayers/vectorOpenlayersImpl.d.ts +2 -2
  10. package/dist/src/layer/openlayers/vectorOpenlayersImpl.js.map +1 -1
  11. package/dist/src/layer/openlayers/vectorTileOpenlayersImpl.js +15 -12
  12. package/dist/src/layer/openlayers/vectorTileOpenlayersImpl.js.map +1 -1
  13. package/dist/src/layer/tileProvider/mvtTileProvider.js.map +1 -1
  14. package/dist/src/layer/wfsLayer.js +4 -0
  15. package/dist/src/layer/wfsLayer.js.map +1 -1
  16. package/dist/src/oblique/obliqueDataSet.js +1 -1
  17. package/dist/src/oblique/obliqueDataSet.js.map +1 -1
  18. package/dist/src/style/arrowStyle.js +5 -5
  19. package/dist/src/style/arrowStyle.js.map +1 -1
  20. package/dist/src/style/declarativeStyleItem.js.map +1 -1
  21. package/dist/src/style/styleHelpers.js +3 -1
  22. package/dist/src/style/styleHelpers.js.map +1 -1
  23. package/dist/src/style/vectorStyleItem.js +8 -8
  24. package/dist/src/style/vectorStyleItem.js.map +1 -1
  25. package/dist/src/util/featureconverter/circleToCesium.js +1 -1
  26. package/dist/src/util/featureconverter/circleToCesium.js.map +1 -1
  27. package/dist/src/util/featureconverter/featureconverterHelper.js +3 -2
  28. package/dist/src/util/featureconverter/featureconverterHelper.js.map +1 -1
  29. package/dist/src/util/featureconverter/lineStringToCesium.js.map +1 -1
  30. package/dist/src/util/featureconverter/pointHelpers.js +1 -1
  31. package/dist/src/util/featureconverter/pointHelpers.js.map +1 -1
  32. package/dist/src/util/featureconverter/pointToCesium.js +4 -3
  33. package/dist/src/util/featureconverter/pointToCesium.js.map +1 -1
  34. package/dist/src/util/featureconverter/polygonToCesium.js +1 -1
  35. package/dist/src/util/featureconverter/polygonToCesium.js.map +1 -1
  36. package/dist/src/util/overrideCollection.js +6 -1
  37. package/dist/src/util/overrideCollection.js.map +1 -1
  38. package/package.json +19 -19
  39. package/src/cesium/cesiumVcsCameraPrimitive.ts +5 -0
  40. package/src/featureProvider/wmsFeatureProvider.ts +1 -1
  41. package/src/layer/featureVisibility.ts +3 -6
  42. package/src/layer/oblique/vectorObliqueImpl.ts +2 -2
  43. package/src/layer/openlayers/vectorOpenlayersImpl.ts +2 -2
  44. package/src/layer/openlayers/vectorTileOpenlayersImpl.ts +21 -17
  45. package/src/layer/tileProvider/mvtTileProvider.ts +2 -2
  46. package/src/layer/wfsLayer.ts +4 -1
  47. package/src/oblique/obliqueDataSet.ts +1 -1
  48. package/src/style/arrowStyle.ts +7 -7
  49. package/src/style/declarativeStyleItem.ts +2 -2
  50. package/src/style/styleHelpers.ts +15 -13
  51. package/src/style/vectorStyleItem.ts +14 -14
  52. package/src/util/featureconverter/circleToCesium.ts +1 -1
  53. package/src/util/featureconverter/featureconverterHelper.ts +9 -5
  54. package/src/util/featureconverter/lineStringToCesium.ts +2 -2
  55. package/src/util/featureconverter/pointHelpers.ts +5 -1
  56. package/src/util/featureconverter/pointToCesium.ts +7 -3
  57. package/src/util/featureconverter/polygonToCesium.ts +1 -1
  58. package/src/util/overrideCollection.ts +6 -1
@@ -29,6 +29,7 @@ import { getModelOptions, getPrimitiveOptions } from './pointHelpers.js';
29
29
  import VectorProperties from '../../layer/vectorProperties.js';
30
30
  import type { VectorHeightInfo } from '../../layer/vectorLayer.js';
31
31
  import { AsyncCesiumVectorContext } from '../../layer/cesium/vectorContext.js';
32
+ import type { ColorType } from '../../style/vectorStyleItem.js';
32
33
 
33
34
  export function getCoordinates(geometries: Point[]): Coordinate[] {
34
35
  return geometries.map((point) => {
@@ -112,7 +113,7 @@ export function getLabelOptions(
112
113
  ): LabelOptions | null {
113
114
  const textStyle = style.getText();
114
115
  const text = textStyle ? textStyle.getText() : null;
115
- if (text) {
116
+ if (text && textStyle) {
116
117
  const options: LabelOptions = {};
117
118
 
118
119
  options.text = text as string;
@@ -134,7 +135,10 @@ export function getLabelOptions(
134
135
 
135
136
  let labelStyle;
136
137
  if (fill) {
137
- options.fillColor = getCesiumColor(fill.getColor(), [0, 0, 0, 1]);
138
+ options.fillColor = getCesiumColor(
139
+ fill.getColor() as ColorType, // XXX PatternDescriptor
140
+ [0, 0, 0, 1],
141
+ );
138
142
  labelStyle = LabelStyle.FILL;
139
143
  }
140
144
  if (stroke) {
@@ -273,7 +277,7 @@ export default async function pointToCesium(
273
277
  scene: Scene,
274
278
  context: AsyncCesiumVectorContext,
275
279
  ): Promise<void> {
276
- if (!style.getImage() && !(style.getText() && style.getText().getText())) {
280
+ if (!style.getImage() && !style.getText()?.getText()) {
277
281
  return;
278
282
  }
279
283
  const validGeometries = geometries.filter((point) => validatePoint(point));
@@ -74,7 +74,7 @@ export function getLineGeometryOptions(
74
74
  options: PolygonGeometryOptions,
75
75
  style: Style,
76
76
  ): PolylineGeometryOptions[] {
77
- const width = parseNumber(style.getStroke().getWidth(), 1.0);
77
+ const width = parseNumber(style.getStroke()?.getWidth(), 1.0);
78
78
  const geometryOptions: PolylineGeometryOptions[] = [];
79
79
 
80
80
  geometryOptions.push({
@@ -288,7 +288,12 @@ function makeOverrideCollection<
288
288
  const itemId = item[overrideCollection.uniqueKey] as string;
289
289
  if (overrideCollection.shadowMap.has(itemId)) {
290
290
  const array = overrideCollection.shadowMap.get(itemId);
291
- return array!.find((i) => i[moduleIdSymbol] === moduleId);
291
+ const shadowItem = array!.find((i) => i[moduleIdSymbol] === moduleId);
292
+ if (shadowItem) {
293
+ const clonedItem = structuredClone(shadowItem);
294
+ delete clonedItem[moduleIdSymbol];
295
+ return clonedItem;
296
+ }
292
297
  }
293
298
  return null;
294
299
  })