Hi Chad thanks for the help.
I did this and the marker is present but no infowindow opens.
var MyMarker = new google.maps.Marker({
position: Argentina,
map: map,
title:"Argentina"
});
google.maps.event.addListener(marker, 'click', function() {
MyInfoWindow.close();
MyInfoWindow.setContent("Content for this marker");
MyInfoWindow.setPosition(MyMarker.getPosition());
MyInfoWindow.open();
});
I'm missing.. .something with the coding here. It's gotta be a rookie
mistake.
Help, please.
On Apr 26, 8:02 pm, Chad Killingsworth
<[email protected]> wrote:
> Only use 1 InfoWindow. On every marker click use the following code:
>
> MyInfoWindow.close();
> MyInfoWindow.setContent("Content for this marker");
> MyInfoWindow.setPosition(MyMarker.getPosition());
> MyInfoWindow.open();
>
> Chad Killingsworth
>
> On Apr 26, 3:01 pm, Jacob <[email protected]> wrote:
>
>
>
> > Great map and nice use of tabs!
>
> > I've seen the "google.maps.event.addListener(map, "click", function(){
> > infoWindow.close();" code before and it hasn't worked for me. I was
> > unable to direct that code to the correct markers.
>
> > Probably why, is because I have separate coding for each infowindow,
> > meaning, I have an infowindow1.open() an infowindow2.open() an
> > infowindow3.open() etc etc. each with their own specific
> > contentstring(s)
>
> > Any ideas?
>
> > On Apr 26, 3:33 pm, Ken Robinson <[email protected]> wrote:
>
> > > At 03:29 PM 4/26/2010, I wrote (in part):
>
> > > >BTW, the map I'm testing is
> > > >http://nnjsda.org/test/gmaps_v3_test3.phpwhichusesjQuery modal
> > > >windows to hold the maps and jQuery tabs in the infowindows. Since
> > > >it's still being tested, there are a lot of debugging AJAX
> > > >statements to trace what's happening.
>
> > > Oops .. forgot to say how you see the maps ... click on the button
> > > that says "Show dances for the next 7 days"...
>
> > > Ken
>
> > > --
> > > 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
> > 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
> 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.