-
Notifications
You must be signed in to change notification settings - Fork 82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Request #68
Comments
Yes, this is already implemented, but seems neither to be documented in the readme nor used in the demos. It only works if |
I'm actually having the opposite problem .. Implemented as from the example I can hover the track but the graph is not "hoverable" and no indicator on the map .. I'm using Leaflet 1.1.0, bootstrap 4.0alpha. ANy suggestion? thanks |
Probably #67? |
Replaced L.Browser.touch by L.Browser.mobile in leaflet.elevation-0.0.4.min.js. |
@nrenner Could you explain your solution further? I don't fully understand how to add it. |
The var g=new L.GPX("./mytrack.gpx", {async: true});
g.on("addline",function(e){
//el.addData(e.line);
el.addData(e.line, g);
}); See modified demo (hover blue line to show position marker in graph): For GeoJSON this already works implicitly when using |
By default, the marker will remain on the elevation profile after the mouse leaves the GPX/GeoJSON layer on the map. You can easily modify this by adding a "mouseout" event in addData(): if (layer) {
layer.on("mousemove", this._handleLayerMouseOver.bind(this)).
on("mouseout", this._mouseoutHandler.bind(this));
} |
See also pending PR #53 |
Is the following possible?
Now hovering the elevation graph will display the current position on the map, but what about the other way around too? Hovering on the map at a specific point will show that exact point at the elevation graph ?
Btw, I am using gpx files
The text was updated successfully, but these errors were encountered: