From ea84f774a7a0fed52d5b26d129505487303f788b Mon Sep 17 00:00:00 2001 From: DennisSchiefer Date: Mon, 13 Aug 2012 16:12:41 +0100 Subject: [PATCH] fixed problem with using non L.LatLng objects --- WebContent/main.js | 6 ------ WebContent/routing/OSRM.RoutingGeometry.js | 3 ++- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/WebContent/main.js b/WebContent/main.js index 7e7d230f4..cb249b949 100644 --- a/WebContent/main.js +++ b/WebContent/main.js @@ -42,12 +42,6 @@ OSRM.init = function() { // // only init default position / geolocation position if GET parameters do not specify a different one // if( OSRM.G.initial_position_override == false ) // OSRM.Map.initPosition(); - - - //var polyline = L.polyline([ [51.509, -0.08], [51.503, -0.06], [51.51, -0.047] ], {dashArray:"8,6"}).addTo( OSRM.G.map ); - var route = new OSRM.SimpleRoute("test", {dashArray:"8,5"}); - route.setPositions( [ [51.509, -0.08], [51.503, -0.06], [51.51, -0.047] ] ); - route.show(); }; diff --git a/WebContent/routing/OSRM.RoutingGeometry.js b/WebContent/routing/OSRM.RoutingGeometry.js index 0aae7c454..367619b15 100644 --- a/WebContent/routing/OSRM.RoutingGeometry.js +++ b/WebContent/routing/OSRM.RoutingGeometry.js @@ -59,7 +59,8 @@ _decode: function(encoded, precision) { } while (b >= 0x20); var dlng = ((result & 1) ? ~(result >> 1) : (result >> 1)); lng += dlng; - array.push( {lat: lat * precision, lng: lng * precision} ); + //array.push( {lat: lat * precision, lng: lng * precision} ); + array.push( [lat * precision, lng * precision] ); } return array; }