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:
1 parent
090520a9f1
commit
931e0ed6f5
102 files changed
+1978
-6
No files matched your search
+5
-5
@@ -290,11 +290,11 @@
|
||||
|
||||
## T41a Maps · View — `src/maps`
|
||||
|
||||
- [ ] MapView — host tiles
|
||||
- [ ] MapMarker
|
||||
- [ ] MapPopup
|
||||
- [ ] LocationPicker
|
||||
- [ ] CoordinateDisplay
|
||||
- [x] MapView — host tiles → `maps::MapView`: the host's tile for each zoom, column and row, the nearest cut scaled past its zooms; a drag, the wheel or the arrows pan, Command-wheel, + and - or its buttons zoom
|
||||
- [x] MapMarker → `maps::MapMarker`, a pin keyed by its place's name, pressable when the map hears it
|
||||
- [x] MapPopup → `maps::MapPopup`, over or under its point toward the larger half, held inside the map
|
||||
- [x] LocationPicker → `maps::LocationPicker`, the place under a center crosshair
|
||||
- [x] CoordinateDisplay → `maps::CoordinateDisplay`, degrees or degrees, minutes and seconds, copyable
|
||||
|
||||
## T41b Maps · Layers
|
||||
|
||||
|
||||
Reference in new issue
Block a user