From b9a817ce26136ef537f8d1d3a3ebf79753d70b96 Mon Sep 17 00:00:00 2001 From: DennisSchiefer Date: Thu, 3 May 2012 16:26:11 +0100 Subject: [PATCH] bug with redrawing print route --- WebContent/printing/printing.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 );