Lionel
unread,Nov 12, 2010, 9:59:38 AM11/12/10Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Google Visualization API
When i use ISO3166-2 codes for french administrative regions (exemple
FR-E) then it's ok
but when i use ISO3166-2 codes for french department (exemple FR-44 or
FR-35), they don't work.
Documentation say about data format : An uppercase ISO-3166-2 region
code name or its English text equivalent (for example, "US-NJ" or "New
Jersey").
Thanks for any help.
My code :
function drawVisualization() {
var data = new google.visualization.DataTable();
data.addRows(3);
data.addColumn('string', 'Departement');
data.addColumn('number', 'Visites');
data.addColumn('string', 'Texte');
data.setValue(0, 0, 'FR-44');
data.setValue(0, 1, 200);
data.setValue(0, 2, 'Loire-Atlantique');
data.setValue(1, 0, 'FR-35');
data.setValue(1, 1, 300);
data.setValue(1, 2, 'Ille et Vilaine');
data.setValue(2, 0, 'FR-17');
data.setValue(2, 1, 150);
data.setValue(2, 2, 'Charente-Maritime');
var options = {};
options['dataMode'] = 'regions';
options['region'] = 'FR';
var geomap = new google.visualization.GeoMap(
document.getElementById('visualization'));
geomap.draw(data, options);
}