Turistforeningen / leaflet-routing

Leaflet.Routing is a routing controller for the popular Leaflet mapping framework. The module provides an intuitive interface for routing paths between waypoints using any user specified routing service.
http://turistforeningen.github.io/leaflet-routing/examples/osm.html
BSD 2-Clause "Simplified" License
262 stars 67 forks source link

Previous route left on map when point added/edited #35

Open canadaka opened 9 years ago

canadaka commented 9 years ago

When I add or edit a point along an existing route, the old route remains on the map, but slightly opaque. Not sure why this is happening or how to stop it. If I refresh the routing using the points,

Image of example map

ghost commented 9 years ago

@canadaka It's a problem for me too. Waiting for a fix :)

Starefossen commented 9 years ago

I'm trying to replicate the reported issue using the OSM demo without luck. Does any of you have a set of steps to reproduce this behaviour?

ghost commented 9 years ago

Hi @Starefossen , i try to replicate on the demo but without luck too. Here is an other example of the " issue " (http://s28.postimg.org/5hplccn5p/for_Github.png) . I have made an function witch can continue drawing a polyline in an automatic mode ( with the help of your plugin ). I use the osm.html example to setup your plugin but i may forget something.

I use the removeWaypoint to manualy remove the last wayPoint and it works perfectly.

this.undoLast = function() { self._routing.removeWaypoint(self._routing.getLast(),function() { // console.log(arguments); });

The problem is that i can't reproduce this issue everytime and i don't know why.

(Sorry for my english)

Thanks for your awesome work!