Skip to content

Instantly share code, notes, and snippets.

@ToeJamson
Created March 21, 2018 17:23
Show Gist options
  • Save ToeJamson/3a7f617aef7dba3acb6fa52b5038f5eb to your computer and use it in GitHub Desktop.
Save ToeJamson/3a7f617aef7dba3acb6fa52b5038f5eb to your computer and use it in GitHub Desktop.
location
var redraw = function(payload) {
lat = payload.message.lat;
lng = payload.message.lng;
map.setCenter({lat:lat, lng:lng, alt:0});
mark.setPosition({lat:lat, lng:lng, alt:0});
lineCoords.push(new google.maps.LatLng(lat, lng));
var lineCoordinatesPath = new google.maps.Polyline({
path: lineCoords,
geodesic: true,
strokeColor: '#2E10FF'
});
lineCoordinatesPath.setMap(map);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment