I\'m using the Google Visualization Geochart API to create a map of a country\'s regions. I provide the ISO 3266-2 Country subdivision code and get the correct results. Howe
This is a quick proof of concept that works, I'm looking at something similar and was hoping to get the name automatically but I'm not sure if that's possible quite yet but this at least allows manual population of the tooltip text.
The key factors are to create your table with the required columns and then apply a PatternFormat to get the tooltip as you want it then create a data view with only those columns that are required for the data binding.
function drawVisualization() {
var data = new google.visualization.DataTable();
data.addColumn('string', 'Country');
data.addColumn('number', 'Value');
data.addColumn('string', 'Display');
data.addRows([
['Germany', 200, 'Germany'],
['United States', 300, 'USA'],
['Brazil', 400, 'Brasil'],
['Canada', 500, 'Canada'],
['France', 600, 'France'],
['RU', 700, 'Russia']
]);
var geochart = new google.visualization.GeoChart(
document.getElementById('visualization'));
var formatter = new google.visualization.PatternFormat('{1}');
formatter.format(data, [0, 2]);
var view = new google.visualization.DataView(data);
view.setColumns([0, 1]);
geochart.draw(view, {width: 556, height: 347});
}