Thanks! That worked!

[EMAIL PROTECTED] schreef:
> On Nov 1, 9:25�am, Wouter <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> > I've got a problem, I've searched the discussion group and found some
> > other discussions on this topic, but none of them worked for me.
> >
> > I have this map:http://wouter.wiwo.nl/temp/legendatest3.html
> >
> > What I want is when I click the marker to open it, there should be a
> > clickable link to close it again, I've tried these ways:
> > map.closeInfoWindow();
> > map.closeInfoWindowTabsHtml();
> > map.getInfoWindow().hide();
> >
> > They're still in the first tab of the infowindow so you guys can check
> > it.
> >
> > Does anybody have an idea what I'm doing wrong?
> >
> The Error console tells me:
> Error: map.closeInfoWindow is not a function
> Source File: http://wouter.wiwo.nl/temp/legendatest3.html
> Line: 1
>
> This is because the map variable is local to the load() function and
> the function is running in the global context.
>
> put:
> var map;
>
> outside of the load function and change this line:
>         var map = new GMap2(document.getElementById("map"));
> to:
>         map = new GMap2(document.getElementById("map"));
>
> (remove the var)
>
>
>   -- Larry
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to