Ticket #2178 (new feature)
Opened 4 years ago
Use Map maxExtent instead of baselayer maxExtent when allOverlays is true
|Reported by:||sbenthall||Owned by:|
Normally, the Map's baselayer is used to determine the Map's maxExtent for the purposes of, e.g., panning and zooming the map.
But suppose allOverlays is true. While the intent of allOverlays isn't particularly laid out in the comments, it seems like you would use allOverlays when you didn't want to have to worry about which layer is the baselayer.
However, because the baselayer is used in getMaxExtent, you do have to worry about it. If, for example, you reorder layers so that a layer with a very small extent is the bottom layer (and therefore the 'baselayer', as far as the code is concerned), then that can lock up panning and zooming (because the new centers that you are panning to are not within the baselayer's extent.)
An alternative which could be truer to the intent of the allOverlays feature would be to use the Map's maxExtent instead of the baselayer's maxExtent when allOverlays is true.