Map tab: much bigger map with its own remembered view
Publish Container / publish (push) Successful in 2m12s
Publish Container / publish (push) Successful in 2m12s
- Map fills the screen (was a 56vh strip); timeline and details sit below it - No longer snaps back to the main-page radar's location/zoom on every refresh or tab switch; starts as a wider regional view, remembers pan/zoom, and recentres only when the location changes - New 'My location' button Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
acdcd6a2c5
commit
4f47d67a7e
4 files changed
+49
-5
No files matched your search
+5
-4
@@ -1281,8 +1281,9 @@ function refreshMapsOverview() {
|
||||
|
||||
if (!state.currentCity) return;
|
||||
|
||||
const zoom = mapsOverview.map.getZoom ? mapsOverview.map.getZoom() : 6;
|
||||
mapsOverview.panTo(state.currentCity.latitude, state.currentCity.longitude, zoom || 6);
|
||||
// Keep the user's own pan/zoom; only (re)centre when the location changes
|
||||
if (window.AppUI && window.AppUI.centerMap) window.AppUI.centerMap(state.currentCity);
|
||||
else mapsOverview.panTo(state.currentCity.latitude, state.currentCity.longitude, mapsOverview.map.getZoom ? mapsOverview.map.getZoom() : 6);
|
||||
|
||||
clearLightningMarkers();
|
||||
clearWindArrows();
|
||||
@@ -1599,8 +1600,8 @@ function renderWeather(data, city) {
|
||||
|
||||
radarEmbed.panTo(city.latitude, city.longitude, 6);
|
||||
radarFull.panTo(city.latitude, city.longitude, 6);
|
||||
const mapZoom = mapsOverview?.map?.getZoom ? mapsOverview.map.getZoom() : 6;
|
||||
mapsOverview.panTo(city.latitude, city.longitude, mapZoom || 6);
|
||||
if (window.AppUI && window.AppUI.centerMap) window.AppUI.centerMap(city);
|
||||
else mapsOverview.panTo(city.latitude, city.longitude, (mapsOverview?.map?.getZoom ? mapsOverview.map.getZoom() : 6) || 6);
|
||||
if (mapsWindEl) mapsWindEl.textContent = `${speedDisplay(c.wind_speed_10m)} ${speedUnit()} ${compassDir(c.wind_direction_10m)}`;
|
||||
updateSourceLocation(city);
|
||||
updateShareUrl(city);
|
||||
|
||||
Reference in new issue
Block a user