Thanks William, this is amazingly useful and particularly creative! I'm very optimistic about your concept as it removes a lot of the complexity from loading the many layers. In the next few days I plan to upload tiles for each of the ~30 layers in the head region. This way I'll have some additional material to 'stress-test' this with a more complex and numerous set of images.
Two questions; - 1.) How can I adapt this SQLarray idea to allow for multiple layers to be added/removed at the same time? For example, there are a few situations where 'if layer A is shown, layer B must also be shown' and 'if layer A is shown, layer B must be hidden'. To give an idea, out of the ~150 layers, these rules occur with around 15 of them. 2.) Less importantly but never-the-less, I was aiming to include an opacity control (probably just a simple slider) at least for some layers (assuming the IE8 opacity problem gets fixed). How could we set this up so that when the click event occurs, the map grabs the sliders opacity value for that layer? On Jul 29, 3:19 am, William <william.g...@gmail.com> wrote: > On Jul 25, 12:57 pm, William <william.g...@gmail.com> wrote: > > > yeah V2 sounds more logical, but V3 more efficient, so we need a data > > structure which reflects the relationships between all layers and > > their display state, backed by the V3 MVCArray, which only contains > > the visible layers in the correct order. > > I had one idea for this generic data structure, based on the concept > of a SQL query, where the contents of the MVCArray are selected from a > table, based on a where condition, sorted in a particular order. > > In this case we want the overlayMapTypes to contain the > "imageMapTypes" where "visible" is true, sorted by "zIndex". > > So I made a composite MVCObject that contains mapType, visible and > zIndex properties, and created a generic SQLArray which adapts > MVCArray, with parameters for "select", "where" and "order". Each > layer was given a unique id (primary key) so it is easy for the rest > of the program to retrieve the layers. > > so the constructor is as follows: > > overlays = new SQLArray(anatomy.overlayMapTypes, { > key: "id", > select: "mapType", > where: "visible", > order: "zIndex" > > }); > > with methods to add() and get() layers. > > see the following example:http://www.william-map.com/20100729/1/overlays.htm > > .... -- 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...@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.