Skip to content

Dragging a route not working anymore #112

@mheigl

Description

@mheigl

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions