RouteMarkersDisplay

Every time new visible segment is emitted this class tries to find a good position for label to display.

Method findRelevantPosition makes 5 attempts to find a point meeting the following criteria:

  • There is at least one position of four intercardinal direction – AltLabelAnchorCalculator is used to calculate those positions and it also sorts them descending according to available space around each label

  • Label should be clearly visible – no intersection with the edges of visible area (visible area is usually smaller than visible map as we don’t want labels to appear below UI elements like navigation guidance, button etc.)

Types

Link copied to clipboard
Link copied to clipboard
data class UiSize(val mapWidth: Float, val mapHeight: Float, val baseLabelWidth: Float, val baseLabelHeight: Float, val minLabelWidth: Float, val minLabelHeight: Float)

Properties

Link copied to clipboard

Functions

Link copied to clipboard
suspend fun start()