google.maps.event.addListener(markerObject, 'click', function(e){
alert('clicked');
});
or, to trigger an event that has a listener already attached from like
jQuery,
$('#some-link').click(function(e){
e.preventDefault();
google.maps.event.trigger(markerObject, 'click');
});
Check out the map events at the bottom of the docs page for more...
On Dec 7, 1:31 pm, CSharp <[email protected]> wrote:
> My google.addListener click event for a maker will open an InfoWindow.
> Is there a way to trigger the click event of a marker via javascript
> code? I know that in jQuery, you can call the object's "click()" or
> use "trigger('click')" to actually trigger the event to fire. I tried
> that within the code and nothing seems to happen.
--
You received this message because you are subscribed to the Google Groups
"Google Maps JavaScript API v3" 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-js-api-v3?hl=en.