Google Chart API & GeoMaps

1.2k views Asked by At

I'm stuck with an issue. Hope someone already faced it and fixed it. I would like to create a interactive geo maps like in Google Analytics. I mean a zoomable map from world to country to display geo infos. I already have all the data split by regions, country and cities. I'm able to put them on a Google geomap at one level. But when the user clicks on a country, I would like he can get more details....like in Analytics at the end. I have tried to add listeners on the geomap to get the event and I hoped to change the options of the geomap on the fly but no luck... Does anyone have an idea ?

Thanks for your help.

1

There are 1 answers

0
fperr On

Found.

I'll share it in case someone is interested.

In javascript, You need to catch the region click event. To be able to do this, you need to change the options of the geomap by speficying the region you're zooming in. In it, you need to get the e['region'] value and to adapt your geo data accordingly. Pass them to your geomap, redraw it and that's it.

Bye