Skip to content
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

Dragging a route not working anymore #112

Open
mheigl opened this issue Mar 11, 2017 · 0 comments
Open

Dragging a route not working anymore #112

mheigl opened this issue Mar 11, 2017 · 0 comments

Comments

@mheigl
Copy link

mheigl commented Mar 11, 2017

Hi!

I noticed that dragging a route throws a JS error as in layer.js in line 291 this._routePolyline()._originalPoints; is undefined.

It seems that _originalPoints is not available anymore in newer Leaflet versions. I was able to fix it by converting the latlngs:

var positions = this._routePolyline()._latlngs;

for (var j = 0; j < positions.length; j++) {
    positions[j] = this._map.latLngToLayerPoint(positions[j]);
}

Best regards,
Michael

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant