According to the Nelson Mandela Centre for Memory, no fewer than 120 streets, roads, boulevards, avenues, bridges, and highways have been named after the first democratically elected president of South Africa, who turns 95 today. A thorough search turned up more than 140, including 50 in South Africa and 10 in the United States. Click on any icon for the full name and location of a Mandela-inspired roadway; zoom in to see the a street map.
var map; var infoWindow = new google.maps.InfoWindow(); var DEFAULT_ICON_URL = 'http://fullsite.motherjones.com/wp-content/uploads/mandela-glow40.png'
// EDIT: change this key to your own from the Google APIs Console // https://code.google.com/apis/console/ var apiKey = 'AIzaSyAPGdqPyukZSGurVLlWRBnJsxgt_fek5OQ';
// EDIT: Specify the table with location data and icon URLs var tableID = '1tZ958w9xLkvmDDIPpHS1dRUM1d8SZ2cn1_sCnFY';
// Create variables for the columns you need to retrieve from the table // EDIT this list as needed, then find and edit two places below. var latitudeColumn = 'Lat'; var longitudeColumn = 'Long'; var iconUrlColumn = 'Icon'; var infowindowContentColumn = 'Info';
function createMarker (coordinate, url, content) { var marker = new google.maps.Marker({ map: map, position: coordinate, icon: new google.maps.MarkerImage(url) }); google.maps.event.addListener(marker, 'click', function(event) { infoWindow.setPosition(coordinate); infoWindow.setContent(content); infoWindow.open(map); }); };
function fetchData() {
// Construct a query to get data from the Fusion Table // EDIT this list to include the variables for columns named above var query = 'SELECT ' + latitudeColumn + ',' + longitudeColumn + ',' + iconUrlColumn + ',' + infowindowContentColumn + ' FROM ' + tableID; var encodedQuery = encodeURIComponent(query);
// Construct the URL var url = ['https://www.googleapis.com/fusiontables/v1/query']; url.push('?sql=' + encodedQuery); url.push('&key=' + apiKey); url.push('&callback=?');
// Send the JSONP request using jQuery $.ajax({ url: url.join(''), dataType: 'jsonp', success: onDataFetched }); }
function onDataFetched(data) { var rows = data['rows']; var iconUrl; var content; var coordinate;
// Copy each row of data from the response into variables. // Each column is present in the order listed in the query. // Starting from 0. // EDIT this if you've changed the columns, above. for (var i in rows) { coordinate = new google.maps.LatLng(rows[i][0],rows[i][1]); iconUrl = rows[i][2]; content = rows[i][3];
if (iconUrl) { // ensure not empty createMarker(coordinate, iconUrl, content); } else { createMarker(coordinate, DEFAULT_ICON_URL, content); } } }
function initialize() {
fetchData(); // begin retrieving data from table, and put it on the map
map = new google.maps.Map(document.getElementById('map-canvas'), { center: new google.maps.LatLng(19.887592958140345, -21.993779300000007), zoom: 2, mapTypeId: google.maps.MapTypeId.ROADMAP }); }
google.maps.event.addDomListener(window, 'load', initialize);
This map include streets that carry Mandela’s birth name, Rolihlahla, and clan name, Madiba. More streets named after Mandela are probably out there; if you know of one that’s not on this map, leave a comment.