This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function encode(locations) { | |
var lastLat = 0.0; | |
var lastLng = 0.0; | |
var result = ""; | |
for (i in locations) { | |
var location = locations[i]; | |
var lat = Math.round(location[1] * 1e5); | |
var lng = Math.round(location[0] * 1e5); |