Skip to content

Commit

Permalink
fix: backward compatibility with icon-text and new style text label i…
Browse files Browse the repository at this point in the history
…n globe
  • Loading branch information
claustres committed Jul 22, 2024
1 parent 3674073 commit eb431aa
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion map/client/mixins/globe/mixin.geojson-layers.js
Original file line number Diff line number Diff line change
Expand Up @@ -242,8 +242,11 @@ export const geojsonLayers = {
// We cannot access data outside the properties object of a feature in Cesium
// As a consequence we copy back any style information inside
// We need to convert to simple-style spec as cesium manages this only
// We also need to merge all styling properties as some entities requires eg both line/polygon style (wall polylines)
// We also need to merge all styling properties as some entities requires eg both line/polygon style (wall polylines or corridor polygons)
const simpleStyle = Object.assign(getPointSimpleStyle(feature, options, engine), getLineSimpleStyle(feature, options, engine), getPolygonSimpleStyle(feature, options, engine))
// Manage our extended simple-style spec
const text = _.get(feature, 'style.text.label')
if (text) simpleStyle['icon-text'] = text
if (!feature.properties) feature.properties = simpleStyle
else Object.assign(feature.properties, simpleStyle)
}
Expand Down

0 comments on commit eb431aa

Please sign in to comment.