Skip to content

Instantly share code, notes, and snippets.

@poltib
Created April 26, 2014 09:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save poltib/11315849 to your computer and use it in GitHub Desktop.
Save poltib/11315849 to your computer and use it in GitHub Desktop.
gmap_script_plotelevation
plot_elevation = function(results, status) {
var data, i;
elevation_req_active = false;
if (status !== google.maps.ElevationStatus.OK) {
return;
}
elevations = results;
data = new google.visualization.DataTable();
data.addColumn('string', 'Sample');
data.addColumn('number', 'Elevation');
for (i = 0; i < results.length; i += 1) {
data.addRow(['', elevations[i].elevation]);
}
elevation_chart.style.display = 'block';
chart.draw(data, {
width: 'auto',
height: 90,
legend: 'none',
titleY: 'Elevation (m)'
});
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment