nickdos
unread,Jun 22, 2009, 7:57:03 PM6/22/09Sign 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 viewing a geomap for just Australia (AU), there is a large area
of ocean filling the bottom 40% of the map div, with the Australian
continent pushed too far to the top of the map.
I'm pretty sure this is due to the fact that Australia has a tiny
island near Antarctica (Macquarie Island), which is affecting the
"bounds" that are generated for Australia. I have seen the same thing
with other GIS applications.
I also note in the example given below that the values given to
"Tasmania" do not display on the map. This might be a bug too.
Example code:
google.load('visualization', '1', {packages: ['geomap']});
function drawVisualization() {
var data = new google.visualization.DataTable();
data.addRows(6);
data.addColumn('string', 'State');
data.addColumn('number', 'Popularity');
data.setValue(0, 0, 'Victoria');
data.setValue(0, 1, 200);
data.setValue(1, 0, 'New South Wales');
data.setValue(1, 1, 300);
data.setValue(2, 0, 'Tasmania');
data.setValue(2, 1, 400);
data.setValue(3, 0, 'South Australia');
data.setValue(3, 1, 500);
data.setValue(4, 0, 'Queensland');
data.setValue(4, 1, 600);
data.setValue(5, 0, 'Northern Territory');
data.setValue(5, 1, 700);
var options = {};
options['region'] = 'AU';
var geomap = new google.visualization.GeoMap(
document.getElementById('visualization'));
geomap.draw(data, options);
}
google.setOnLoadCallback(drawVisualization);