map-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:
| Module | What it does |
|---|---|
projection |
Web Mercator lon/lat ↔ pixel math |
tile |
XYZ tile ids, bounds, quadkeys, children/parent |
geo |
Haversine distance, bearing, destination point |
geofence |
Polygon & circle geofences, point-in-polygon |
view |
Camera state: center, zoom, bearing, pitch |
cluster |
Grid-based marker clustering |
heatmap |
Heatmap intensity grids |
draw |
Drawing session with undo/redo |
measure |
Distance/area measurement + human formatting |
navigation |
Turn-by-turn maneuver detection (VI/EN), progress tracking |
geojson |
Minimal GeoJSON types |
Usage
[]
= "0.1.0"
use ;
let hanoi = new;
// Web Mercator projection
let = to_pixels;
// Tile containing the point
let t = from_lon_lat;
println!;
// Distance
let haiphong = new;
println!;
Development
map-engine-rust 🦀🗺️ (Tiếng Việt)
Nhân bản đồ (map engine) thuần Rust, không phụ thuộc thư viện ngoài — port từ bản TypeScript maps-engine.
Cung cấp toàn bộ phép toán mà bản đồ trượt (slippy-map) cần, không dính dáng gì đến render hay DOM. Xem bảng module ở trên.
Dùng thử
License
MIT