Expand description
Shared state for interchangeable map providers. This crate loads no map SDK.
Use day-piece-map-canvas, day-piece-map-apple, or day-piece-map-google to render it.
A view belongs to one mounted provider at a time. Keep it outside the provider-switch scope
to preserve camera and annotations. Provider-specific options live in the provider crates.
Structs§
- Camera
Request - A move the app asked for, carried out by the piece over
durationseconds. - Interaction
- Gesture controls shared by all providers.
- LngLat
- A position on the globe, in degrees.
- MapTap
- Where the user tapped (
MapView::tap): the point, the position under it, the marker hit if any. Provider-specific basemap feature queries live in provider crates. - MapView
- The state of a map, shared between the piece and the app: where it looks and how close, which the app sets to move the map and reads to learn where the user took it, plus what the piece reports back about loading and drawing.
- Marker
- A pin on the map at a position, with an optional title shown beside it and a tag the app uses to know it again when it is tapped.
- Marker
Id - A marker’s handle, from
MapView::add_marker.
Enums§
- Camera
Target - MapStatus
- Initialization state reported by the active provider.
- Overlay
- Geographic geometry in WGS84. Widths are logical points; circle radii are meters. Coordinates are normalized by the provider; empty lines/rings are ignored.
Constants§
- MAX_
LATITUDE - The latitude limit of Web Mercator.
- MAX_
ZOOM - The highest zoom a camera accepts; sources end sooner and are overzoomed up to here.
Functions§
- clamp_
zoom - Normalize a zoom, including non-finite input, to the shared range.
- wrap_
bearing - A bearing brought into
-180.0..180.0.