computePosition

abstract fun computePosition(visibleArea: Rect, containerWidth: Int, containerHeight: Int, screenState: AndroidAutoScreenState): VehiclePosition?

Computes the vehicle icon position from the visible area and surface dimensions.

Called from onVisibleAreaChanged() whenever the visible area updates.

Return

The computed vehicle position, or null to skip repositioning for this state

Parameters

visibleArea

The unobscured area of the map surface (in pixels)

containerWidth

The full surface width (in pixels)

containerHeight

The full surface height (in pixels)

screenState

The current AA screen state (NAVIGATION, MAP_VIEW, etc.)