No you have to wait till the sidebar element actually exists... sorry I 
didnt detail it more
you need to add a listener for the event "parsed" should look something like
this...

 GEvent.addListener( exml1, 'parsed', function(){ 
exml1.toggleContents(0,false);});

AllFoldersOpen = true, over-rides to open state.. but the opposite 
doesnt force them
closed (which would be a reasonable  improvement )


Lara wrote:
> Hi Lance,
>
> I cannot get exml.toggleContents(0,false); to work. The folder for the
> exml1 parsed data opens upon initiation. See relevant code below, and
> my page at:http://www.tchdgis.org/googlemaps/mainEHserviceNPL.html.
> Click "Show/Hide Layers" and check "EPA Datasets".
>
> Am I putting toggleContents in the right location? I want the Folder
> in the sidebar for exml1 (Permit Compliance System) closed and
> unchecked.
>
> ------ CODE
> var gicon = new GIcon(icon,"http://www.tchdgis.org/googlemaps/
> greensm.gif");
> var bicon = new GIcon(icon,"http://www.tchdgis.org/googlemaps/
> bluesm.gif");
>
> var exml = new GeoXml("exml", map,"NPL_FS.xml", {noshadow:true,
> sidebarid:"the_side_bar",  iwwidth:260, allfoldersopen:false,
> iconFromDescription:false, domouseover:false, baseicon:bicon});
> var exml1 = new GeoXml("exml1", map, "PCS_FS.xml", {noshadow:true,
> sidebarid:"the_side_bar", allfoldersopen:false,
> iconFromDescription:false, domouseover:false, baseicon:icon});
> var exml2 = new GeoXml("exml2", map, "AFS_FS.xml", {noshadow:true,
> sidebarid:"the_side_bar", allfoldersopen:false,
> iconFromDescription:false, domouseover:false, baseicon:gicon});
>
> exml1.toggleContents(0,false);
> exml1.parse("Permit Compliance System");
>
>
>
> >
> .
>
>   


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