getVisibleTiles

fun getVisibleTiles(center: LatLng, zoom: Float, viewWidth: Int, viewHeight: Int, panOffsetX: Float = 0.0f, panOffsetY: Float = 0.0f, tileSize: Double = ProjectionUtils.TILE_SIZE): List<TileCoordinate>(source)

Calculates which tiles are visible at a fractional zoom level.

The tiles are of the zoom level tileZoom and drawn scaled to the fractional zoom.

Return

A list of tile coordinates that should be rendered

Parameters

center

The map center location

zoom

The current, possibly fractional zoom level

viewWidth

The viewport width in pixels

viewHeight

The viewport height in pixels

panOffsetX

The horizontal pan offset in screen pixels (default 0)

panOffsetY

The vertical pan offset in screen pixels (default 0)

tileSize

The width of a tile on screen at a whole zoom level, in pixels (default 256)


fun getVisibleTiles(center: LatLng, zoom: Int, viewWidth: Int, viewHeight: Int, panOffsetX: Float = 0.0f, panOffsetY: Float = 0.0f): List<TileCoordinate>(source)

Calculates which tiles are visible in the current viewport.

Includes a 1-tile buffer around the edges for smooth panning. Tile Y stays within the world, tile X does not, see ViewportCalculator.

Return

A list of tile coordinates that should be rendered

Parameters

center

The map center location

zoom

The current zoom level

viewWidth

The viewport width in pixels

viewHeight

The viewport height in pixels

panOffsetX

The horizontal pan offset in pixels (default 0)

panOffsetY

The vertical pan offset in pixels (default 0)