Problem 1: Info window content.
On line 165 of your main.css file you have a style #content { margin-
left: 12em;}. That is what is spacing your info window text left since
the content of your info window is wrapped in a <div id="content">
tag.

Problem 2: recenter map on info window close
You'll need to add an event to the info window. Something like:

var infowindow = new google.maps.InfoWindow({
    content: contentString,
    maxWidth: 500
});
google.maps.event.addListener(marker, 'click', function() {
    infowindow.open(map,marker);
});
google.maps.event.addListener(infowindow, 'closeclick', function() {
    map.setCenter(myLatlng);
});

Problem 3: Inside your calcRoute function, add:

infowindow.close();


Good Luck,

Chad Killingsworth

On Jan 30, 7:59 am, Ando <[email protected]> wrote:
> First problem is in my info window the text starts from about halfway
> across which i thought to be very strange and can not find problems
> with the css like margins or anything, yet an info window on another
> map i have appears to be working fine. Any suggestions appreciated
>
> Secondly i have searched and looked at the tutorial except i cant find
> where to re center the map after a info window is closed.
>
> And also i would like to know how to close an info window after
> directions are given through a calcRoute function.
>
> All very simple but help would be appreciated link to site 
> ishttp://linea.websitewelcome.com/~mbbc/location.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 [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.

Reply via email to