Re: Im not able to find bermuda(BM) country on geomap

52 views
Skip to first unread message

asgallant

unread,
Aug 8, 2012, 2:22:47 PM8/8/12
to google-visua...@googlegroups.com, Kiran podila
Countries that are too small don't appear on the maps.  Even when the maps are drawn large enough to see their outlines, the API still ignores them.  Note that this is also the case with geocharts (which have replaced geomaps). 

On Wednesday, August 8, 2012 8:58:09 AM UTC-4, Kiran wrote:
Im quit new to this API,here im not able to find bermuda on geomap. i wrote code as below

var data = new google.visualization.DataTable();
data.addRows(regobj.length);
data.addColumn('string', 'Country Code');
 data.addColumn('number', 'No. of Participants');
data.addColumn('string', 'Country Name');
data.setValue(0, 0, 'BM');
 data.setValue(0, 1, 1000);
data.setValue(0, 2, 'Bermuda');
 data.setValue(1, 0, 'IS');
 data.setValue(1, 1, 2);
 data.setValue(1, 2, 'Iceland');
 data.setValue(2, 0, 'BS');
 data.setValue(2, 1, 2);
data.setValue(2, 2, 'Bahamas');
 var options = {};
 options['dataMode'] = 'regions';
 options['width'] = 3000;
options['height'] = 1500;
 options['showZoomOut'] = false;
 options['colors'] = [0xabf194, 0x5dca39, 0x1f8009];
var container = document.getElementById('map_canvas');
 var geomap = new google.visualization.GeoMap(container);
geomap.draw(data, options);



can any one help me please.

Kiran

unread,
Aug 9, 2012, 2:36:28 AM8/9/12
to google-visua...@googlegroups.com
Thank you for you replay,im getting bermuda in region mode, but here im not able to find the states Hamilton, Devonshire on geo chart, i wrote the code as below,

 var data = google.visualization.arrayToDataTable([
    ['State', 'Popularity'],
    ['Hamilton', 200],
    ['Devonshire',1000]
     ]);

  var geochart = new google.visualization.GeoChart(
      document.getElementById('visualization'));
  geochart.draw(data, {dataMode:'regions',region:'BM',width: 556, height: 347});

please help in this.

asgallant

unread,
Aug 9, 2012, 11:20:31 AM8/9/12
to google-visua...@googlegroups.com
Try setting the "resolution" option to "provinces" - this is what you need to show states/provinces.  Note that not all countries support this option, however.
Reply all
Reply to author
Forward
0 new messages