Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #23991
| From | Richard Maher <maher_rjSPAMLESS@hotmail.com> |
|---|---|
| Newsgroups | comp.lang.javascript |
| Subject | Re: Displaying infoWindow onload or onclick? |
| Date | 2014-04-30 20:46 +0800 |
| Organization | Aioe.org NNTP Server |
| Message-ID | <ljqrbj$1f9$1@speranza.aioe.org> (permalink) |
| References | <ljojta$15t$1@news.albasani.net> |
On 4/30/2014 12:27 AM, Tuxedo wrote:
> The below code is part of gmap v3 whereby clicking on one of several pins
> on a typical google map will pop up an info-window at the pointer. The
> function is part of a larger code block with various display options:
>
> var onMarkerSomewhere = function() {
> var marker = this;
> var latLng = marker.getPosition();
> infoWindow.setContent('hello');
> infoWindow.open(map, marker);
> };
>
> var Somewhere = new google.maps.Marker({
> map: map,
> position: new google.maps.LatLng(-36.874638, 49.847593)
>
> });
>
> google.maps.event.addListener(Somewhere, 'click', onMarkerLocation);
>
> I would like to launch the info-window from an external link elsewhere on
> the page or at onload of the document. It's basically the
> 'onMarkerSomewhere' that needs to run in another situation than the onclick
> of the marker itself. How would the function call be constructed to run for
> example in an onclick or in a subsequent part of the code block?
>
> Many thanks for any pointers!
> Tuxedo
>
google.maps.event.trigger(targetObject,"click");
?
Back to comp.lang.javascript | Previous | Next — Previous in thread | Find similar | Unroll thread
Displaying infoWindow onload or onclick? Tuxedo <tuxedo@mailinator.com> - 2014-04-29 18:27 +0200
Re: Displaying infoWindow onload or onclick? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2014-04-29 20:46 +0100
Re: Displaying infoWindow onload or onclick? Tuxedo <tuxedo@mailinator.com> - 2014-04-29 23:12 +0200
Re: Displaying infoWindow onload or onclick? Richard Maher <maher_rjSPAMLESS@hotmail.com> - 2014-04-30 20:46 +0800
csiph-web