Big help William. Thank you.

That was the step I needed. However, I've noticed I'm getting syntax
errors. Precisely at this first spot -->

MyInfoWindow.setContent("<b>Brazil</b><br>World Cups: 1958,
1962, 1970, 1994, 2002");

When I change it to MyInfoWindow.getContent(contentString); the syntax
errors go away. Can I do it this way, directing the code to grab the
content elsewhere and still achieve the same results? or is there just
some minor, tiny coding error in what you gave me? I've exhausted over
it all and have come to no conclusion, at the moment.

Have a feeling once this tiny thing gets resolved, it's smooth sailing
from there. So thank you!

On Apr 27, 6:35 pm, William <[email protected]> wrote:
> you need to call the InfoWindow constructor once at the start of the
> program, then open it with new content on the marker clicks, something
> like this:
>
> var MyInfoWindow = new google.maps.InfoWindow();
>
> var Argentina = new google.maps.LatLng(-33.6,-64.383333);
> var ArgentinaMarker = new google.maps.Marker({
>     position: Argentina,
>     map: map,
>     title:"Argentina"
>
> });
>
> google.maps.event.addListener(ArgentinaMarker, 'click', function() {
>       MyInfoWindow.setContent("<b>Argentina</b><br>World Cups: 1978,
> 1986");
>       MyInfoWindow.open(map, ArgentinaMarker);
>
> });
>
> var Uruguay = new google.maps.LatLng(-32.723,-55.679);
> var UruguayMarker = new google.maps.Marker({
>     position: Uruguay,
>     map: map,
>     title:"Uruguay"
>
> });
>
> google.maps.event.addListener(UruguayMarker, 'click', function() {
>       MyInfoWindow.setContent("<b>Uruguay</b><br>World Cups: 1930,
> 1950");
>       MyInfoWindow.open(map, UruguayMarker);
>
> });
>
> var Brazil = new google.maps.LatLng(-12.726,-52.295);
> var BrazilMarker = new google.maps.Marker({
>     position: Brazil,
>     map: map,
>     title:"Brazil"
>
> });
>
> google.maps.event.addListener(BrazilMarker, 'click', function() {
>       MyInfoWindow.setContent("<b>Brazil</b><br>World Cups: 1958,
> 1962, 1970, 1994, 2002");
>       MyInfoWindow.open(map, BrazilMarker);
>
> });
>
> ...
>
> --
> 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 
> athttp://groups.google.com/group/google-maps-js-api-v3?hl=en.

-- 
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