On Mar 13, 10:01 am, "[email protected]" <[email protected]> wrote: > On Mar 13, 9:41 am,BuckyE<[email protected]> wrote: > > > > > Wow, my brains are in a whirl. I have to try and figure out what > > you've done! > > > It seems that the test page loads the sidebar in the usual way > > (broken) then fixes it. In between the two events, my Firebug says a > > "main.js" at Google is unhappy. > > > I wonder if the code > > // Create the initial sidebar > > makeSidebar(); > > in the onload section should be > > // Create the initial sidebar > > polysLoaded > > ? That special function only needs to happen once, right? I'm only > > showing and hiding overlays. My map never adds or removes them, so > > after the (hypothetically) modularized "poly-draw" routine runs during > > onload, it never needs to run again. So the latency issue with getting > > the isHidden value of true is solved. > > The way that example works is: > It runs the sidebar once at the end of the xml processing (this is > incase things change and the below stops working). > I added listeners to the polygons and the polylines that fire when > their visibility is changed. > The visibilitychanged event fires after the polylines or polygons have > been added to the map and hidden. > Once both the first polyline and the first polygon have been hidden > (this is what polysLoaded does), it assumes that all of them have been > hidden, and runs the makeSidebar function one more time, which since > the modules are now loaded, should work correctly (without the > dependency on a hardcoded time which may not work everywhere). > > > But if function polysLoaded() is really the excellent solution, it seems to > > me it should run before the > > sidebar gets collected. Or maybe I'm off on a tangent. It's more than > > I can take in at a gulp! You are the crown prince of this > > javascripting! > > > I also wonder if I need a "Loading..." div to be shown while function > > polysLoaded() is running? That would be polite, especially for times > > when Google or soemone's network might be really slow. > > > Oh, this would be so great to have implemented! I can't imagine how > > you can figure all this out, and you're very kind to take so much time > > with my little project. > > How about > this:http://code.google.com/apis/maps/documentation/demogallery.html?searc...
or this: http://groups.google.com/group/Google-Maps-API/browse_frm/thread/38c6acb1341a112e/d6aaa73f85154ea2 as used on this page: http://www.hardins.com/retail2.htm > > -- Larry > > > > > On Mar 12, 4:58 pm, "[email protected]" <[email protected]> > > wrote: > > > > On Mar 12, 1:27 pm, "[email protected]" <[email protected]> > > > wrote: > > > > This page uses the polygon visibilitychanged and the polyline > > > > visibility changed events to go back and regenerate the sidebar once > > > > they are correct:http://www.geocodezip.com/romanholidaymap_polysC.asp > > > > > It removes the dependency on time (the setTimeout) but adds a > > > > dependency that there be both polylines and polygons in the xml file. > > > -- Larry- 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 -~----------~----~----~----~------~----~------~--~---
