class ZoomedLayoutScheme extends LayoutScheme
Layout for zoom levels based off of a power-of-2 scheme, used in Leaflet et al.
- Alphabetic
- By Inheritance
- ZoomedLayoutScheme
- LayoutScheme
- Serializable
- Serializable
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
new
ZoomedLayoutScheme(crs: CRS, tileSize: Int, resolutionThreshold: Double)
- crs
The CRS this zoomed layout scheme will be using
- tileSize
The size of each tile in this layout scheme
- resolutionThreshold
The percentage difference between a cell size and a zoom level and the resolution difference between that zoom level and the next that is tolerated to snap to the lower-resolution zoom level. For example, if this paramter is 0.1, that means we're willing to downsample rasters with a higher resolution in order to fit them to some zoom level Z, if the difference is resolution is less than or equal to 10% the difference between the resolutions of zoom level Z and zoom level Z+1.
Value Members
- val crs: CRS
-
def
levelFor(extent: Extent, cellSize: CellSize): LayoutLevel
- Definition Classes
- ZoomedLayoutScheme → LayoutScheme
- def levelForZoom(worldExtent: Extent, id: Int): LayoutLevel
- def levelForZoom(id: Int): LayoutLevel
- val resolutionThreshold: Double
- val tileSize: Int
-
def
toString(): String
- Definition Classes
- ZoomedLayoutScheme → AnyRef → Any
-
def
zoom(x: Double, y: Double, cellSize: CellSize): Int
This will calcluate the closest zoom level based on the resolution in a UTM zone containing the point.
This will calcluate the closest zoom level based on the resolution in a UTM zone containing the point. The calculated zoom level is up to some percentage (determined by the resolutionThreshold) less resolute then the cellSize. If the cellSize is more resolute than that threshold's allowance, this will return the next zoom level up.
-
def
zoomIn(level: LayoutLevel): LayoutLevel
- Definition Classes
- ZoomedLayoutScheme → LayoutScheme
-
def
zoomOut(level: LayoutLevel): LayoutLevel
- Definition Classes
- ZoomedLayoutScheme → LayoutScheme