Skip to main content

mln_map/
lib.rs

1//! The map: [`Map`], its options, the transform that moves its camera, and
2//! the events it reports. The map vocabulary that lower crates need
3//! (`CameraOptions`, `MapMode`, `TransformState`, ...) lives in
4//! `mln_map_types` and is re-exported here.
5
6mod feature_state;
7mod map;
8mod map_event;
9mod map_options;
10mod map_snapshot;
11// gtests-core: MapProjection (test/map/map.test.cpp).
12mod map_projection;
13mod style_loader;
14pub mod transform;
15
16pub use map::{Map, style_camera};
17pub use map_event::{CameraChange, CameraChangeMode, CameraChangeSource, MapEvent, RenderFrameStatus};
18pub use map_options::MapOptions;
19pub use map_projection::MapProjection;
20pub use map_snapshot::{CameraBounds, FreeCamera, MapSnapshot, TileSettings};
21pub use mln_map_types::{
22    AnchoredMomentum, AnimationOptions, AxonometricMode, BoundOptions, Camera, CameraDelta, CameraError, CameraLimits,
23    CameraMomentum, CameraOptions, CameraUpdate, CameraUpdateMode, CameraVelocity, ConstrainMode, Elevation,
24    FreeCameraOptions, GesturePhase, InvalidMomentum, LogicalExtent, MapMode, MapView, MomentumDecay,
25    MomentumDecayModel, MomentumEasing, MomentumGlide, MomentumSnap, NorthOrientation, ProjectionMode, TerrainOptions,
26    TerrainSkirtLength, TileLodMode, TransformState, TransitionEnd, TransitionOutcome, View, Viewport, ViewportMode,
27};
28pub use mln_renderer::{
29    OverscaledTileID, RenderMode, RendererEvents, RenderingStats, TileOperation, Update, UpdateReader,
30};
31pub use mln_style::StyleLoadError;
32pub use mln_util::event_queue::Waker;
33pub use mln_util::{Error, ErrorKind};
34pub use transform::{CameraCommandId, CommandEnd, FrameClock};
35
36/// The `log` targets of this crate's records. Each names the event that
37/// `mln_c` reports the record under (`mln_c::logging`).
38mod log_target {
39    pub(crate) const GENERAL: &str = "mln_map::general";
40    pub(crate) const SETUP: &str = "mln_map::setup";
41    pub(crate) const PARSE_STYLE: &str = "mln_map::parse_style";
42    pub(crate) const STYLE: &str = "mln_map::style";
43    pub(crate) const RENDER: &str = "mln_map::render";
44}
45
46#[cfg(test)]
47mod tests;