On Mar 7, 4:23 pm, Thomas Baxter <thomas.bax...@gmail.com> wrote: > You're totally right about the show/hide solution. > I think I'll see about loading each layer as hidden, then showing them in > the desired order. > Would actually be a nicer way to load data as well, instead of the current > "blink" that goes on when each layer is loaded. > > Thanks for picking that up though, I totally missed it. I'll post a follow > up with full code once its done.
BTW - I don't see your "blue marker", I don't think the "files/ marker_icon.png" reference will work, I think you need an absolute URL there. -- Larry > > On Mon, Mar 7, 2011 at 6:38 PM, geocode...@gmail.com > <geocode...@gmail.com>wrote: > > > > > On Mar 7, 1:21 pm, Thomas Baxter <thomas.bax...@gmail.com> wrote: > > > The following links have two different orders (the order by which they > > > appear in the orange sidebar is the order in which they were loaded) > >http://pmlf.net/gmaps/?ordering=1http://pmlf.net/gmaps/?ordering=2 > > > > and here's the javascript file: > >http://pmlf.net/gmaps/js/locator_version2.js > > > > In the first link the blue marker should be on top; redlines on top of > > the > > > green overlay; green overlay on top of the yellow overlay. > > > > In the second link the ordering should be: yellow overtop of everything, > > the > > > blue marker underneath that, the green overlay, then the red lines. > > > > Now, when I was preparing this and doing some more testing, this started > > to > > > work... sporadically. At first I though that the problem had vanished, > > but > > > no: merely more Wierdness. > > > > It seems that everytime you reload the page, the layers have a chance to > > > order themselves properly, or completely change their orders altogether. > > The > > > is truly odd. > > > My suspicion is that the order depends on the order the results arrive > > back from google's server, as the requests are asynchronous and when > > the result comes back depends on network conditions, server load, > > complexity of the kml and order requested; you may not be able to > > control that very easily. > > > Toggling a layer seems to move it to the top of the stack. Perhaps > > you can request the layers, then hide them all [.setMap(null)] and > > show them [setMap(map)] in the order you want them to appear. > > > -- Larry > > > > Hopefully I am just making a glaring oversight. > > > > FYI Layer descriptions: > > > Roads_ST = red lines > > > NaturalAreas_SimplifyPolygon = small areas, sorta green > > > ConservationBlueprints_sm = large area, sorta yellow > > > geo = the single blue pin > > > > Thanks for your time > > > > On Mon, Mar 7, 2011 at 3:35 PM, geocode...@gmail.com > > > <geocode...@gmail.com>wrote: > > > > > On Mar 7, 12:02 pm, Thomas <thomas.bax...@gmail.com> wrote: > > > > > So, I'm having a real dilly of a pickle of a problem getting KML > > > > > layers to stack properly. > > > > > > I have a varied group of overlays which I want to render: Polygons, > > > > > Polylines and Markers. > > > > > > I hunted through the groups and found this > > > > > - > >http://groups.google.com/group/google-maps-js-api-v3/browse_thread/th. > > > > .. > > > > > - which outlines the way to sequentially load your KML and supposedly > > > > > have them stack properly. > > > > > > Unfortunately, this doesn't appear to be working. Would be great if > > it > > > > > did! I am using the "metadata_changed" toggle. > > > > > > I have also read that there appears to be a separate stack for each > > of > > > > > the overlay types. I don't know if that is true, but for the sake of > > > > > argument let's say two KML Polygons layers. > > > > > > Now, here's where the odd parts come in: > > > > > Regardless of the order in which I add the KML layers to the maps the > > > > > stack order is always the same. > > > > > > For the life of me, I can't figure out why cherry faced rooster > > > > > plucking files order themselves this way (FYI this includes all of > > the > > > > > types of overlays) > > > > > > I attempted to change the altitudeMode attribute in the KML files to > > > > > see if it played a roll: no dice. I've examined the styles line-by- > > > > > line and they are identical between all the files. > > > > > Would you have an example that exhibits the problem? > > > > > -- Larry > > > > > > Any idea what governs the stack order for KML layers? > > > > > > Thanks in advance all. > > > > > -- > > > > 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 > > > > google-maps-js-api-v3@googlegroups.com. > > > > To unsubscribe from this group, send email to > > > > google-maps-js-api-v3+unsubscr...@googlegroups.com. > > > > For more options, visit this group at > > > >http://groups.google.com/group/google-maps-js-api-v3?hl=en.-Hide > > quoted text - > > > > - Show quoted text - > > > -- > > 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 > > google-maps-js-api-v3@googlegroups.com. > > To unsubscribe from this group, send email to > > google-maps-js-api-v3+unsubscr...@googlegroups.com. > > For more options, visit this group at > >http://groups.google.com/group/google-maps-js-api-v3?hl=en.- Hide quoted > >text - > > - Show quoted text - -- 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 google-maps-js-api-v3@googlegroups.com. To unsubscribe from this group, send email to google-maps-js-api-v3+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-maps-js-api-v3?hl=en.