this works for me:

function initialize()
{
        var latlng = new google.maps.LatLng(36.242439,139.424304);
        var opt =
        {
        center:latlng,
        zoom:14,
        mapTypeId: google.maps.MapTypeId.ROADMAP,
        disableAutoPan:false,
        navigationControl:true,
        navigationControlOptions:
{style:google.maps.NavigationControlStyle.DEFAULT },
        mapTypeControl:true,
        mapTypeControlOptions:
{style:google.maps.MapTypeControlStyle.DEFAULT}
        };

        var map = new google.maps.Map(document.getElementById("map"),opt);
        var marker= new google.maps.Marker({
        position: new google.maps.LatLng(36.242439,139.424304),
        title: "??????",
        clickable: true,
        map: map
        });



var content = '<strong>Oi oi!</strong><br/>Here we are!';

var infowindow = new google.maps.InfoWindow({
        content: content,
        maxWidth: 100
});


google.maps.event.addListener(marker, 'click', function() {
        infowindow.open(map,marker);
});

infowindow.open(map,marker);
}


i just added infowindow.open(map,marker); to the init function

On 8 Feb., 09:57, Hybrid <peterloure...@gmail.com> wrote:
> Hello there.
>
> Been going crazy trying to work this out.
> Wonder if any of you chaps could help me out?
>
> I've created a map with a marker and a info box attached to it. It opens and
> closes when clicked. All is well...
>
> ...apart from I'd really like it to also be be *open* *when the page first
> loads*.
>
> I managed to get it open on load without the click to open and close
> functionality. But I'd really like the user to have the option of clicking
> it again if they need to.
>
> I've googled and searched this forum, but couldn't find the answer.
> Any help much appreciated.
>
> Map is here>>http://www.ok-hybrid.com/googletest.html

-- 
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 google-maps-js-api-v3@googlegroups.com.
To unsubscribe from this group, send email to 
google-maps-js-api-v3+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-maps-js-api-v3?hl=en.

Reply via email to