On Feb 5, 10:14 pm, "[email protected]" <[email protected]>
wrote:
> On Feb 5, 10:02 pm, AndyM <[email protected]> wrote:
>
> > This gmap tutorial popus up an alert with a counter when the map is
> > clicked:http://code.google.com/apis/maps/documentation/examples/event-bind.html
>
> > Is there a way to also trigger that popup (continuing the same
> > counter) by clicking a new HTML button elsewhere on the page?  What
> > would  the onClick call be?  
>
> What is wrong with just triggering a click event on the 
> map?http://code.google.com/apis/maps/documentation/reference.html#GMap2.c...
>
> GEvent.trigger(map, "click");
>
> I have surfed around with firebug, but
>
> > can't seem to find it.  Thanks!
>
> Did you try the documentation?

Oh.  One catch.  The map variable has to be global for it to be
available from click events on HTML elements.  In the example you
reference, it is local to the initialize function.

  -- Larry

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps 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-maps-api?hl=en.

Reply via email to