your code should look something like this:
google.visualization.events.addListener(geochart, 'regionClick',
function(eventData)
{
alert('You clicked on a region named: ' + eventData.region);
});
the eventData (as you called it) returns an object named region that hold
an ISO-3166 name of the region clicked.
if you want the exact position of the mouse where you clicked you'll need
to use the window event.
On Sun, Nov 20, 2011 at 4:05 AM, Matt Nuttall <[email protected]>wrote:
> Hi Fellow Geochart persons;
>
> Hats off to Google for this interface. I have one last piece to put into
> place for my project.
>
> I have a standard listener on a geochart. Here's a reduced sample of the
> relevant code:
>
> function ClickHandler()
> {
> google.visualization.events.addListener(qohla.chart, 'regionClick',
> function(eventData)
> {
> alert("x " + eventData.clientX + " y " + .clientY);
> });
> }
>
> Both clientX and clientY return as undefined.
>
> My goal is to allow geomap to process the event business as usual so I can
> capture the region name selected on the map click. Then, I want to capture
> the exact location of the region where the click happened so that I could
> then overlay some text at exactly where the click occurred.
>
> Is it possible to get the coordinates after the event? Is it possible to
> write text over the map using the coordinates?
>
> Thanks in advance.
>
> Matt
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Visualization API" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/google-visualization-api/-/i9YnDHjYy8YJ.
> To post to this group, send email to
> [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/google-visualization-api?hl=en.
>
--
You received this message because you are subscribed to the Google Groups
"Google Visualization API" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-visualization-api?hl=en.