Skip to content

Commit

Permalink
fix line draw altitude wall Not working properly fix #2167 (#2168)
Browse files Browse the repository at this point in the history
  • Loading branch information
deyihu authored Dec 25, 2023
1 parent 7830138 commit 1933c86
Show file tree
Hide file tree
Showing 3 changed files with 163 additions and 88 deletions.
8 changes: 8 additions & 0 deletions src/geometry/Geometry.js
Original file line number Diff line number Diff line change
Expand Up @@ -1524,6 +1524,14 @@ class Geometry extends JSONAble(Eventable(Handlerable(Class))) {
return 0;
}

hasAltitude() {
const altitude = this._getAltitude();
if (!altitude) {
return false;
}
return true;
}

setAltitude(alt) {
if (!isNumber(alt)) {
return this;
Expand Down
7 changes: 5 additions & 2 deletions src/renderer/geometry/symbolizers/DrawAltitudeSymbolizer.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,11 @@ export default class DrawAltitudeSymbolizer extends PointSymbolizer {
if (!layer.options['drawAltitude']) {
return;
}
const properties = this.geometry.getProperties();
if (!properties || !properties[layer.options['altitudeProperty']]) {
// const properties = this.geometry.getProperties();
// if (!properties || !properties[layer.options['altitudeProperty']]) {
// return;
// }
if (!this.geometry.hasAltitude()) {
return;
}
const style = this._getStyle();
Expand Down
Loading

0 comments on commit 1933c86

Please sign in to comment.