I'm trying to upload an Excel Spreadsheet containing student names their geolocations, and their "top skills" from an online class into the Google Javascript API.
Eventually, I want each location to have a popup box associated with it, displaying the student name and their top skills.
From what I can tell according to the API, I have to use Data Arrays like this to plot the markers:
var locations = [
['Bondi Beach', -33.890542, 151.274856, 4],
['Coogee Beach', -33.923036, 151.259052, 5],
['Cronulla Beach', -34.028249, 151.157507, 3],
['Manly Beach', -33.80010128657071, 151.28747820854187, 2],
['Maroubra Beach', -33.950198, 151.259302, 1]
];
Then I could add these locations like this:
for (i = 0; i < locations.length; i++) {
marker = new google.maps.Marker({
position: new google.maps.LatLng(locations[i][1], locations[i][2]),
map: map
});
}
A couple of questions:
- Is there a speedier way of uploading the Excel Spreadsheet Data into a Javascript format without manually writing each location?
- How do I associate those specific locations with a student name and list of skills?