Google Visualization API Geomap: How to handle marker click events?

Posted by Carlos da Costa on Stack Overflow See other posts from Stack Overflow or by Carlos da Costa
Published on 2011-02-01T18:16:54Z Indexed on 2011/02/01 23:25 UTC
Read the original article Hit count: 264

Hello. I initially have the Google Visualization API Geomap on a world view (options['dataMode'] = 'regions') and I capture the 'regionClick' event when a country is clicked like so:

google.visualization.events.addListener(
    geomap, 'regionClick', function (e) {
        var rowindex = data.getFilteredRows([{column: 0, value: e['region']}]);  
        var location = data.getValue(rowindex[0], 3);
        location.href = "?ISO=" + e['region'] + "&Location=" + location;
    });

I then draw the map zoomed into the country in markers mode (options['dataMode'] = 'markers'). However, I can't seem to capture any events when the markers themselves are clicked.

The documentation ( http://code.google.com/apis/visualization/documentation/gallery/geomap.html#Events ) only refers to 'select' and 'regionClick' events neither of which are fired in this case. (Tested using Chrome 9, and IE 8.)

Has anybody had any success in doing this? Many thanks.

© Stack Overflow or respective owner

Related posts about google-visualization

Related posts about geomap