Currently, moveTo is used to control the visibility. Without calling moveTo, the layer will remain displayed. This is because of the logic in Map.setCenter(). The right behavior seems to be:
- If inRange changes and is now false, we should call setVisibility(false) from within Map.setCenter()
- If this is the case, we *don't* call Layer.moveTo
- We should change the moveTo functions on the layer to no longer be the one to call display(false) on the layer.
This change would probably fix #685, but we don't want to cause churn right before 2.5 at this level, so we're pushing it to 2.6, hopefully right after we release 2.5, so that we can get maximum testing on it.
Clearer description of problem:
Tiles for invisible layers are downloaded from server after layer(s) goes
beyond its minScale.
Value of minScale is making layer not downloaded while map initialization
but downloaded after zooming to scale < minScale, even if layer is not
switched on.