I have multiple GroundOverlays loaded on the map and I try to keep them ordered. It seems the only thing I can do is to loaded (create the GroundOverlay object and setMap(map)) one by one (Please let me know if there are other better ways), whcih I can live with for now. However, I also have controls (checkboxes) to turn on/off a individual layer, which ends with the order is completely messed up. For instance, say I have L1, L2, L3 three layers ordered from bottom to top, if I turn off L2 and turn it on again, the L2 will be on the top of L3 as L2 was removed from the map when turned off.
My first attempt is to find a way to manage the order of the GroundOverlays, which I failed (could not find any); The second attempt is to try if I can ‘hide’ the layer when turn it off instead of removing the layer when calling setMap(null).
Any idear? Thanks!
You can set the opacity to zero: