Displaying infoWindow onload or onclick?

Giganews Newsgroups
Subject: Displaying infoWindow onload or onclick?
Posted by:  Tuxedo (tuxe…@mailinator.com)
Date: Tue, 29 Apr 2014

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

Replies