@@ -0,0 +1,1468 @@
+// This is adapted from the implementation in Project-OSRM%0A// https://github.com/DennisOSRM/Project-OSRM-Web/blob/master/WebContent/routing/OSRM.RoutingGeometry.js%0Awindow.polyline = %7B%7D;%0Awindow.polyline.decode = function(str, precision) %7B%0A    var index = 0,%0A        lat = 0,%0A        lng = 0,%0A        coordinates = %5B%5D,%0A        shift = 0,%0A        result = 0,%0A        byte = null,%0A        latitude_change,%0A        longitude_change,%0A        factor = Math.pow(10, precision %7C%7C 6);%0A%0A    // Coordinates have variable length when encoded, so just keep%0A    // track of whether we've hit the end of the string. In each%0A    // loop iteration, a single coordinate is decoded.%0A    while (index %3C str.length) %7B%0A%0A        // Reset shift, result, and byte%0A        byte = null;%0A        shift = 0;%0A        result = 0;%0A%0A        do %7B%0A            byte = str.charCodeAt(index++) - 63;%0A            result %7C= (byte & 0x1f) %3C%3C shift;%0A            shift += 5;%0A        %7D while (byte %3E= 0x20);%0A%0A        latitude_change = ((result & 1) ? ~(result %3E%3E 1) : (result %3E%3E 1));%0A%0A        shift = result = 0;%0A%0A        do %7B%0A            byte = str.charCodeAt(index++) - 63;%0A            result %7C= (byte & 0x1f) %3C%3C shift;%0A            shift += 5;%0A        %7D while (byte %3E= 0x20);%0A%0A        longitude_change = ((result & 1) ? ~(result %3E%3E 1) : (result %3E%3E 1));%0A%0A        lat += latitude_change;%0A        lng += longitude_change;%0A%0A        coordinates.push(%5Blng / factor, lat / factor%5D);%0A    %7D%0A%0A    return coordinates;%0A%7D;%0A%0A

Update decode.js