getVisibleTiles

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.

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)