mirror of
https://github.com/gpxstudio/gpx.studio.git
synced 2025-08-31 23:53:25 +00:00
get waypoint elevation
This commit is contained in:
@@ -338,7 +338,11 @@ export class GPXLayer {
|
||||
let waypoint = get(currentPopupWaypoint)?.[0];
|
||||
if (waypoint) {
|
||||
let marker = this.markers[waypoint._data.index];
|
||||
if (this.map.project(marker.getLngLat()).dist(this.map.project(e.lngLat)) > 100) {
|
||||
if (marker) {
|
||||
if (this.map.project(marker.getLngLat()).dist(this.map.project(e.lngLat)) > 100) {
|
||||
this.hideWaypointPopup();
|
||||
}
|
||||
} else {
|
||||
this.hideWaypointPopup();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user