I'm working on a project where I am utilizing tile overlays (visual) to display a rendering of the space, building names, accessibility, and parking spaces as well as KML polygons (functionality) to allow the user to click on various buildings or points of interest to bring up further information. My current issue lies in the organization of these various elements.
At the moment, the KML polygons are appearing above all the tile overlays, including building names and parking which I would prefer to be on top of the KML polygons as they are otherwise partly obscured by the polygons. In short, here is the current layering:
- KML Polygons
- Building Names (Transparent)
- Accessibility (Transparent)
- Parking (Transparent)
- Space Rendering (Opaque)
- Google Maps
Ideally, I would prefer to have the KML polygons appear within these tile overlays, namely right above the rendering of the space. Thus, I wish to obtain this layering:
- Building Names (Transparent)
- Accessibility (Transparent)
- Parking (Transparent)
- KML Polygons
- Space Rendering (Opaque)
- Google Maps
Is there anyway to rearrange the KML the tile overlay layers to achieve this?
Tile Overlays:
map.overlayMapTypes.insertAt(0, renderMapType);
map.overlayMapTypes.insertAt(1, parkingMapType);
map.overlayMapTypes.insertAt(2, accessMapType);
map.overlayMapTypes.insertAt(3, nameMapType);
Edit:
Allow me to explain the map a bit more clearly.
When Google Maps is in "Map", the rendering is displayed and most of the KML polygons are invisible, those unrepresented on the render remaining visible so that the user is still aware of their presence. When Google Maps is in "Satellite", the rendering isn't displayed and all the KML polygons are visible and overlay their respective elements on the satellite image, making them easier for the user to see.
In either case, the accessibility, parking, and name overlays can be used and, as there is always at least some KML polygons which must be visible, I've resorted to looking for a way to reorder the layers.