I don't know if there is any way to determine what regions are available. You can set up an "error" event handler, and use it to back out to the previous region:
var previousRegion, previousResolution;google.visualization.events.addListener(geochart, 'regionClick', function(eventData) { previousRegion = options.region; previousResolution = options.resolution; options['region'] = eventData.region; options['resolution'] = 'provinces'; geochart.draw(data, options);}google.visualization.events.addListener(geochart, 'error', function () { // back out one region options.region = previousRegion; options.resolution = previousResolution; geochart.draw(data, options);}On Monday, August 27, 2012 11:08:50 PM UTC-4, Rômulo Vitoi wrote:
I have a map set to region = world, and this event to zoom in:
google.visualization.events.addListener(geochart, 'regionClick', function(eventData) {
options['region'] = eventData.region;
options['resolution'] = 'provinces';
geochart.draw(data, options);
}
When I click on US then US-TX it works, but when I click on BR then BR-RJ it gives me this error: Requested map does not exist.
Is there a way to check if the region map is avaible so I can avoid this error?