Hi Lance,

This does exactly what I want, Except, for some reason the map zooms
out to level 2 (or 3) after the XML parses. Thank you for fixing this!

Lara

On Jan 31, 12:16 pm, Lance Dyas <[email protected]> wrote:
> Update your geoxml, the allfoldersopen option will now control the open
> or closed state of the
> GML sidebar.
>
> parsed event is now firing correctly... but did you want the content
> visible or just the folder
> closed?
>
>
>
> Lance Dyas wrote:
> > It looks like the parsed event isnt being thrown correctly for non-kml
> > data formats. Will see about fixing it.
>
> >Larawrote:
>
> >> Hi Lance,
>
> >> Thanks again, but I'm sorry I am not having any luck with this. The
> >> folder is still remains open after the sidebar initiates. I also
> >> thought that AllFoldersOpen:false would set the sidebar to have the
> >> folders closed upon parsing. I have tried to tweak the newsest version
> >> of the geoxml.js to get the effect I want, but I can't figure it out.
>
> >>Lara
>
> >> ------ CODE
> >> 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});
>
> >> exml1.parse("Permit Compliance System");
> >> GEvent.addListener( exml1, 'parsed', function(){
> >> exml1.toggleContents(0,false);});
>
> >> On Jan 29, 7:06 pm, Lance Dyas <[email protected]> wrote:
>
> >>> 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 )
>
> >>> Larawrote:
>
> >>>> 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");
>
> >>>> .- Hide quoted text -
>
> >>> - Show quoted text -
>
> >> .
>
> > .- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
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