Show position in elevation diagram when hovering path on map, closes #29

This commit is contained in:
Norbert Renner 2016-06-21 10:15:39 +02:00
parent 83ce7ff79a
commit 42d04e52c2
2 changed files with 22 additions and 4 deletions

View file

@ -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));
}
}
});