Maps · View: host tiles, pins and a popup, a picker, coordinates

maps::MapView lays the host's tile for each zoom, column and row in Web
Mercator, the nearest cut scaled past the zooms it serves, on whole
pixels. gpui packs pictures in its atlas without padding and samples
them linearly, so each tile draws with a one-pixel rim copied from its
own edge, one of its pixels larger each side and clipped, and no seam
shows. A drag, the wheel or the arrows pan; Command-wheel, + and - or
its buttons zoom about the pointer or the center; the owner keeps the
viewport. MapMarker pins take a press and Enter when the map hears
them; MapPopup opens toward the map's larger half and stays inside it,
closing by its button or Escape. LocationPicker picks the place under a
center crosshair; CoordinateDisplay writes degrees or degrees, minutes
and seconds with tabular figures and a copy button. The gallery's tiles
are Natural Earth's countries, cut z0 to z3 by scripts/tiles.py.
This commit is contained in:
ZacharyZhang-NY committed 2026-09-27 21:22:50 -04:00
1 parent 090520a9f1
commit 931e0ed6f5
102 files changed
+1978 -6

No files matched your search

+2
View File
@@ -5,6 +5,7 @@ mod dashboard;
mod files;
mod generative;
mod interaction;
mod maps;
mod media;
mod messaging;
mod onboarding;
@@ -29,6 +30,7 @@ pub use dashboard::DashboardSizes;
pub use files::FileSizes;
pub use generative::GenerativeSizes;
pub use interaction::InteractionSizes;
pub use maps::MapSizes;
pub use media::MediaSizes;
pub use messaging::MessagingSizes;
pub use onboarding::OnboardingSizes;