Skip to main content

Crate maps_engine_rust

Crate maps_engine_rust 

Source
Expand description

§maps_engine_rust

Zero-dependency map engine core in Rust — a port of the TypeScript maps-engine.

Provides the math every slippy-map needs, without any rendering or DOM:

  • projection — Web Mercator lon/lat ↔ pixel math
  • tile — XYZ tile ids, bounds, quadkeys
  • geo — haversine distance, bearings, destinations
  • geofence — polygon & circle geofences
  • view — camera state (center, zoom, bearing, pitch)
  • cluster — grid marker clustering
  • heatmap — heatmap intensity grids
  • draw — drawing session with undo/redo
  • measure — distance / area measurement + formatting
  • navigation — turn-by-turn maneuver detection & progress
  • geojson — minimal GeoJSON types

Rendering (canvas/wgpu/web-sys) is intentionally out of scope — pair this crate with your renderer of choice.

Re-exports§

pub use geo::LonLat;
pub use view::View;

Modules§

cluster
Grid-based marker clustering. Port of cluster.ts.
draw
Drawing tools with undo/redo history. Port of draw.ts + edit.ts.
geo
Geographic math — distances, bearings, destinations on the sphere.
geofence
Geofencing — point-in-polygon and circular fences. Port of geofence.ts.
geojson
Minimal GeoJSON types. Port of geojson.ts.
heatmap
Heatmap intensity grid. Port of heatmap.ts.
measure
Distance / area measurement. Port of measure.ts + measure-live.ts.
navigation
Turn-by-turn navigation math. Port of navigation.ts + routing.ts.
projection
Web Mercator projection — port of projection.ts.
tile
Slippy-map tile math — XYZ tiles, bounds, quadkeys.
view
Camera / view state — center, zoom, bearing, pitch. Port of view.ts.