Skip to content

Commit

Permalink
fix: 3D style need both line/polygon properties (closes #871)
Browse files Browse the repository at this point in the history
  • Loading branch information
claustres committed Jun 4, 2024
1 parent 8ab87dc commit 09c6335
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions map/client/mixins/globe/mixin.geojson-layers.js
Original file line number Diff line number Diff line change
Expand Up @@ -211,12 +211,9 @@ export const geojsonLayers = {
feature.id = getFeatureId(feature, options)
// We cannot access data outside the properties object of a feature in Cesium
// As a consequence we copy back any style information inside
const styleType = getFeatureStyleType(feature)
// We need to convert to simple-style spec as cesium manages this only
let simpleStyle
if (styleType === 'point') simpleStyle = getPointSimpleStyle(feature, options, engine)
else if (styleType === 'line') simpleStyle = getLineSimpleStyle(feature, options, engine)
else simpleStyle = getPolygonSimpleStyle(feature, options, engine)
// We also need to merge all styling properties as some entities requires eg both line/polygon style (wall polylines)
const simpleStyle = Object.assign(getPointSimpleStyle(feature, options, engine), getLineSimpleStyle(feature, options, engine), getPolygonSimpleStyle(feature, options, engine))
if (!feature.properties) feature.properties = simpleStyle
else Object.assign(feature.properties, simpleStyle)
}
Expand Down

0 comments on commit 09c6335

Please sign in to comment.