Hey all,
Thanks in advance for any help you can provide.
I am trying to call the InfoWindow Onload.
Here is the script I'm currently working with (external js file):
function initialize() {
var latlng = new google.maps.LatLng(42.3314,-83.0458);
var settings = {
zoom: 8,
center: latlng,
mapTypeControl: true,
mapTypeControlOptions: {style:
google.maps.MapTypeControlStyle.DROPDOWN_MENU},
navigationControl: true,
navigationControlOptions: {style:
google.maps.NavigationControlStyle.ZOOM_PAN},
mapTypeId: google.maps.MapTypeId.ROADMAP
};
var map = new google.maps.Map(document.getElementById("map"),
settings);
var companylogo1 = new google.maps.MarkerImage('/WebCat/images/
marker.png',
new google.maps.Size(35,35),
new google.maps.Point(0,0),
new google.maps.Point(35,35)
);
var companyPos = new google.maps.LatLng(42.4742634,-83.4255980);
var companyMarker1 = new google.maps.Marker({
position: companyPos,
map: map,
icon: companylogo1,
title:"Farmington Hills, Michigan"
});
var contentString1 = '<div id="maps">'+
'<h1>Farmington Hills</h1>'+
'<p>Contractors Pipe & Supply<br />24895 N. Industrial Dr.<br /
>Farmington Hills, MI 48335</p>'+
'</div>';
var infowindow1 = new google.maps.InfoWindow({
content: contentString1
});
google.maps.event.addListener(companyMarker1, 'click', function() {
infowindow1.open(map,companyMarker1);
});
}
Any help would be appreciated. Thanks!
--
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.