Show position in elevation diagram when hovering path on map, closes #29
This commit is contained in:
parent
83ce7ff79a
commit
42d04e52c2
2 changed files with 22 additions and 4 deletions
|
|
@ -21,10 +21,9 @@ BR.Elevation = L.Control.Elevation.extend({
|
|||
}
|
||||
|
||||
if (track && track.getLatLngs().length > 0) {
|
||||
// TODO disabled track layer mouseover, as it doesn't really work
|
||||
// with line marker and indicator does not get removed (no mouseout?)
|
||||
//this.addData(track.toGeoJSON(), layer);
|
||||
this.addData(track.toGeoJSON());
|
||||
this.addData(track.toGeoJSON(), layer);
|
||||
|
||||
layer.on("mouseout", this._hidePositionMarker.bind(this));
|
||||
}
|
||||
}
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue