Posted By

adino on 10/14/11


Tagged

google bug api visualization


Versions (?)

Google visualization GeoMap problem


 / Published in: JavaScript
 

If you use this snippet in http://code.google.com/apis/ajax/playground/?type=visualization#geo_map it shows SK - ISO3166 code for Slovakia somewhere in Canada. Although personally I wouldn't mind, it seems to be incorrect.

  1. function drawVisualization() {
  2. var data = new google.visualization.DataTable();
  3. data.addRows(6);
  4. data.addColumn('string', 'Country');
  5. data.addColumn('number', 'Popularity');
  6. data.setValue(0, 0, 'SK');
  7. data.setValue(0, 1, 200);
  8. data.setValue(1, 0, 'US');
  9. data.setValue(1, 1, 300);
  10. data.setValue(2, 0, 'IE');
  11. data.setValue(2, 1, 400);
  12. data.setValue(3, 0, 'FR');
  13. data.setValue(3, 1, 500);
  14.  
  15. var options = { 'dataMode': 'markers' }
  16. var geomap = new google.visualization.GeoMap(
  17. document.getElementById('visualization'));
  18. geomap.draw(data, options);
  19. }

Report this snippet  

You need to login to post a comment.