bug with redrawing print route

This commit is contained in:
DennisSchiefer 2012-05-03 16:26:11 +01:00
parent 4130144687
commit b9a817ce26

View File

@ -84,7 +84,8 @@ OSRM.drawMarkers = function( markers ) {
// manage route
OSRM.drawRoute = function( positions ) {
OSRM.G.route = new L.DashedPolyline();
if( OSRM.G.route == undefined )
OSRM.G.route = new L.DashedPolyline();
OSRM.G.route.setLatLngs( positions );
OSRM.G.route.setStyle( {dashed:false,clickable:false,color:'#0033FF', weight:5} );
OSRM.G.map.addLayer( OSRM.G.route );