Skip to content

Commit

Permalink
drawAltitude support Array<Symbol> for every Geometry (#2371)
Browse files Browse the repository at this point in the history
  • Loading branch information
deyihu authored Jul 3, 2024
1 parent 4b19181 commit 12c8224
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/renderer/geometry/symbolizers/DrawAltitudeSymbolizer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,15 @@ export default class DrawAltitudeSymbolizer extends PointSymbolizer {

_getStyle(): any {
// read drawAltitude from layer every time
let style = this.geometry.getLayer().options['drawAltitude'];
const layer = this.geometry.getLayer();
let style = layer.options['drawAltitude'];
if (Array.isArray(style)) {
const geos = layer.getGeometries() || [];
const index = geos.indexOf(this.geometry);
if (index >= 0) {
style = style[index] || defaultSymbol;
}
}
if (!isObject(style)) {
style = defaultSymbol;
}
Expand Down

0 comments on commit 12c8224

Please sign in to comment.