Either I am missing something very basic, or the geomaps visualization
does not, in fact, work with metropolitan area codes as is claimed in
the documentation.
I took the example code from the markers example at
http://code.google.com/apis/visualization/documentation/gallery/geomap.html
and inserted it into the code playground. It worked as shown, using
the names of the cities in the first column. But when I change the
value in the first column to a metro code, the marker is not drawn.
The code sample below draws all the markers except for the first, in
which I have substituted "501" for "New York". 501 is the metropolitan
area code for New York according to
http://code.google.com/apis/adwords/docs/appendix/metrocodes.html#New%20York
Does anyone know how to use metropolitcan area codes with the geomap
visualization?
function drawVisualization() {
var data = new google.visualization.DataTable();
data.addRows(6);
data.addColumn('string', 'City');
data.addColumn('number', 'Popularity');
data.setValue(0, 0, '501');
data.setValue(0, 1, 200);
data.setValue(1, 0, 'Boston');
data.setValue(1, 1, 300);
data.setValue(2, 0, 'Miami');
data.setValue(2, 1, 400);
data.setValue(3, 0, 'Chicago');
data.setValue(3, 1, 500);
data.setValue(4, 0, 'Los Angeles');
data.setValue(4, 1, 600);
data.setValue(5, 0, 'Houston');
data.setValue(5, 1, 700);
var options = {};
options['region'] = 'us_metro';
options['colors'] = [0xFF8747, 0xFFB581, 0xc06000]; //orange colors
options['dataMode'] = 'markers';
var container = document.getElementById('visualization');
var geomap = new google.visualization.GeoMap(container);
geomap.draw(data, options);
}