Skip to main content

Module controller

Module controller 

Source
Expand description

MapController — wires a Slint MapView instance to a TileSource.

The controller:

  1. Owns the active tile source (boxed, so it’s swappable at runtime).
  2. Holds the canonical camera state (centre_lon, centre_lat, zoom) — the Slint properties of the same name are mirrors, updated by MapController::refresh.
  3. Translates the pan and zoom-by callbacks the Slint MapView fires (during user gestures) back into camera moves.
  4. Pushes the visible-tile model into the MapView after every refresh.

Structs§

MapController
Owns the source + camera; refreshes the MapView’s tile model.