Skip to Content
API ReferenceMapRoutePadding

RoutePadding

data class RoutePadding(val top: Int = 120, val right: Int = 120, val bottom: Int = 120, val left: Int = 120)

Per-edge padding applied when fitting the camera to a route.

All values are in raw pixels. Prefer the dp / uniformDp factories when the input is in density-independent units, so the rendered padding looks consistent across screen densities.

The field order follows the CSS convention (top, right, bottom, left). When forwarded to MapLibre this value is re-ordered internally to MapLibre’s (left, top, right, bottom) contract.

Constructors

RoutePaddingconstructor(top: Int  = 120, right: Int  = 120, bottom: Int  = 120, left: Int  = 120)

Types

NameSummary
Companionobject Companion

Properties

bottom

val bottom: Int = 120

Bottom padding in pixels.

left

val left: Int = 120

Left padding in pixels.

val right: Int = 120

Right padding in pixels.

top

val top: Int = 120

Top padding in pixels.

Last updated on