Leaflet.Elevation icon indicating copy to clipboard operation
Leaflet.Elevation copied to clipboard

GPX: Invoke _handleLayerMouseOver on the correct layer

Open adg29 opened this issue 8 years ago • 0 comments

Added the conditional typeof layer==='undefined'. This ensures that layer is correctly assigned to the line object that is made available by the addLine callback in the GPX use-case. Previously there was only a check for null, which prevented the correct assignment to the layer that is assigned the mouseover.

With the correct assignment, mouseover is now triggered on the line and the corresponding point in the elevation diagram is indicated.

Tested on a GPX file @ http://codepen.io/adg29/full/jAzpRo/

adg29 avatar Jul 21 '16 20:07 adg29