MapNodePolicy

Which nodes a map shows, and which of them draws on top.

Renderer-independent on purpose. Both map engines answer these two questions, and until this existed each answered them separately — the Google map inline in MapView, the MapLibre map in its own module, which the Google flavour cannot even depend on. They had already drifted apart on the first question.

Properties

Link copied to clipboard
const val PRIORITY_ORDINARY: Int = 4

Everything else, with nothing to distinguish between them.

Link copied to clipboard
const val PRIORITY_PROMINENT: Int = 5

Drawn above everything else: this node and favorites.

Functions

Link copied to clipboard
fun priorityOf(node: Node, myNodeNum: Int?): Int

How far up the stack a node draws.

Link copied to clipboard
fun visibleNodes(nodes: List<Node>, filterState: BaseMapViewModel.MapFilterState, nowSeconds: Long, myNodeNum: Int?): List<Node>

Applies the map's filter chips to the node list.