map-expressions
map-expressions is a dependency-free Rust library for deterministic map-label
layout. It provides:
- validated latitude and longitude;
- viewports that can cross the antimeridian;
- normalized screen projection;
- zoom-dependent feature visibility;
- localized labels with explicit fallback;
- priority-based collision suppression.
Example
use ;
let mut label = new;
label.insert?;
label.insert?;
let feature = new?;
let viewport = new?;
let placed = layout?;
assert_eq!;
# Ok::
Sources and scope
The design is informed by the Geospatial Information Authority of Japan's explanation of vector tiles and map expression and the experimental GSI Maps Vector.
This crate is independent and unofficial. It does not download or license map data, perform Web Mercator projection, render graphics, or guarantee that a map is suitable for navigation, surveying, emergency response, or legal boundaries.