mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-10-23 15:36:33 +00:00
fix(tours): say to zoom in when the pistes are on further out than they draw
The pistes overlay has no tiles below zoom 9, so switching it on at a region or country view left the map empty while the switch looked on, which read as broken. Both maps now report their zoom with the viewport, on the 256 px tile scale raster sources count in (a GL map's own zoom is one step lower there), and the planner hands it to its overlays. While the pistes are on and the map is further out than their first tiles, the switch stays pressed in the soft accent, its tooltip and the key's first line say to zoom in, and the screen reader hears it once. An unknown zoom claims nothing.
This commit is contained in:
@@ -180,7 +180,11 @@ export interface MapViewProps {
|
||||
roadtripVias?: Record<number, RoadtripVia[]>;
|
||||
onMoveVia?: (dayId: number, id: number, lat: number, lng: number) => void;
|
||||
onRemoveVia?: (dayId: number, id: number) => void;
|
||||
onViewportChange?: (bbox: { south: number; west: number; north: number; east: number }) => void;
|
||||
/**
|
||||
* The visible area after every move, and the zoom on the 256 px tile scale
|
||||
* raster tile URLs count in (a GL map's own zoom is one step lower there).
|
||||
*/
|
||||
onViewportChange?: (bbox: { south: number; west: number; north: number; east: number }, zoom: number) => void;
|
||||
/**
|
||||
* The raster tile URL template. Only the Leaflet renderer draws raster tiles;
|
||||
* the GL renderer draws the style of the chosen provider and ignores it.
|
||||
|
||||
Reference in New Issue
Block a user