LayerZoomRange

The layer-level zoom range rule, kept separate from TileLayer so it can be exercised directly.

A TileLayer needs a controller, a source and a render context to exist, none of which a unit test can reasonably stand up — and the interesting part here is two comparisons and one conjunction.

Functions

Link copied to clipboard
fun contains(zoom: Double, minZoom: Float?, maxZoom: Float?): Boolean

Whether zoom falls inside [minZoom, maxZoom].

Link copied to clipboard
fun isVisible(zoom: Double, visible: Boolean, minZoom: Float?, maxZoom: Float?): Boolean

Whether a layer should draw at zoom.