diff --git a/WebContent/printing/printing.js b/WebContent/printing/printing.js index a8c272001..00c3225f0 100644 --- a/WebContent/printing/printing.js +++ b/WebContent/printing/printing.js @@ -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 );