Show Continents in GeoMap or Geo Chart

5,861 views
Skip to first unread message

mags

unread,
May 23, 2011, 2:47:22 PM5/23/11
to Google Visualization API
IS there a way to show up continents with geomap or geochart.
My goal here is to show the continents and on click event needs to
show the specific countries in each continents.

ChartALot

unread,
May 24, 2011, 7:44:55 AM5/24/11
to google-visua...@googlegroups.com
Hi,
Using the GeoChart, you can view the world map, split into continents or subcontinents (by setting options['resolution'] = 'continents' (or 'subcontinents')). This option is not documented yet, so the maps may change a bit in the future.

If you hook into the regionClick event, can be notified once your user clicks a region, and redraw the map with different options. 

For example:

  var geochart new google.visualization.GeoChart(
      document.getElementById('visualization'));
  var options {region'world'resolution'continents'width556height347};
  google.visualization.events.addListener(geochart'regionClick'function(eventData
{
    // maybe you want to change the data table here...
    options['region'eventData.region;
    options['resolution''countries';
    geochart.draw(dataoptions);  
  });
  geochart.draw(dataoptions);

HTH



--
You received this message because you are subscribed to the Google Groups "Google Visualization API" group.
To post to this group, send email to google-visua...@googlegroups.com.
To unsubscribe from this group, send email to google-visualizati...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-visualization-api?hl=en.


mags

unread,
May 24, 2011, 5:47:36 PM5/24/11
to Google Visualization API
Hi Thanks for the reply,


can you tell us how to add the continents and subcontinents in the
datatable

i tried adding like this

var data = new google.visualization.DataTable();
data.addRows(3);
data.addColumn('string', 'continents ');
data.addColumn('number', 'Popularity');

It seems not working.
> >http://groups.google.com/group/google-visualization-api?hl=en.- Hide quoted text -
>
> - Show quoted text -

ChartALot

unread,
May 25, 2011, 4:45:18 AM5/25/11
to google-visua...@googlegroups.com
Yes, that is a bug, will be fixed soon.
You can still show the continent / subcontinent map and register for the regionClick event (in the meanwhile).

mags

unread,
May 26, 2011, 12:51:04 AM5/26/11
to Google Visualization API
Hi,

Thanks.
I will eloborate my project goal. can you give me a solution for this

In my project i need to show up few countries and continents as(United
States,Canada,Mexico,South America Continent,Africa
Continent,Europe,Asia,Australia)
Will i be able to show up all these using a datatable where both
country and continents will be my values to the datatable. On region
click of United States i have to show up regions like (pacific
coast,rocky mountains,midwest &plains,Midsouth,Gulf States,Carolinas
and the South East,New England,Midatlantic
whereas when i click on South America it should show up all the
countries in it.


In the existing system we use the world map image and based on the
cordinates we highlight the above mentioned regions.
Is there a way to use these coordinates in geoMap or geoChart.

Can you suggest a solution for this .

ChartALot

unread,
May 26, 2011, 4:00:27 AM5/26/11
to google-visua...@googlegroups.com
I see.
All are maps are homogeneous - each showing a partition of (a portion of) the world into a specific resolution level. So we don't provide the option of mixing continents and countries at the same time.

Moreover, we have only two resolutions for the US: 'provinces' (shows the states in the US) and 'metros' (show metropolitan ares). So you can only use the marker mode (available currently only in the Geomap visualization) to show those.

The closest solution that you can have is probably allow your users to navigate around the different available maps. On specific maps, you may want to show up data using the marker mode.

manish thakur

unread,
Feb 13, 2014, 8:14:46 AM2/13/14
to google-visua...@googlegroups.com, mageswar...@gmail.com

hi, i want to insert the data into database of continent using google API in my java code, so how and which API i used so that my requirements is full filled..

with regards:
manish
Reply all
Reply to author
Forward
Message has been deleted
0 new messages