Maps · Layers: routes, GeoJSON, heat and clusters

MapView takes layers over its tiles and under its pins. RouteLine runs
along places the short way across the date line. read_geojson reads RFC
7946 to features, strictly: a position past the globe, a line of one
position or a ring that does not close fails with its reason, and a
feature placed nowhere keeps no geometry. GeoJsonLayer washes areas as
one path per polygon, so holes stay open, outlines them, strokes lines
and dots points. GeoHeatmap spreads weighted places in a quartic kernel
over small cells, scaled to the densest spot in view. Lines and areas
unwrap across the date line and repeat on every world in view.
cluster_markers gathers pins by squares of the world, so a pan keeps
each group; a cluster shows its count, and its press shows its members
whole, never farther out. A zoom that may regroup them hands a focused
pin's or cluster's focus to the map.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
ZacharyZhang-NYandClaude Opus 5.5 committed 2026-09-27 22:35:40 -04:00
1 parent f5909f6e43
commit a3115b8126
16 files changed
+1350 -48

No files matched your search

+6
View File
@@ -1,5 +1,9 @@
mod cluster;
mod coords;
mod geo;
mod geojson;
mod heat;
mod layer;
mod marker;
mod picker;
#[cfg(all(test, feature = "test-support"))]
@@ -9,6 +13,8 @@ mod view;
pub use coords::{CoordFormat, CoordinateDisplay};
pub use geo::{LatLon, MAX_LAT, MapViewport, Tile};
pub use geojson::{Feature, Geometry, read_geojson};
pub use layer::{GeoHeatmap, GeoJsonLayer, MapLayer, RouteLine};
pub use marker::{MapMarker, MapPopup};
pub use picker::LocationPicker;
pub use view::MapView;