Live wall: report the starting view once so a copied link carries the viewport (#234)

Without it the URL had no z/lat/lon until the first pan, so a link copied
from an untouched wall opened at the other browser's remembered view.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Logan Cusano
2026-10-05 03:02:44 -04:00
co-authored by Claude Opus 5.5
parent afd2bc463d
commit b6055019fc
+4
View File
@@ -1274,6 +1274,10 @@ export default function MapView({
mapInstance.on("overlayremove", onRemove);
mapInstance.on("baselayerchange", onBase);
mapInstance.on("moveend", onMove);
// Report the starting state once, so the URL carries the viewport even if
// the viewer never pans: a copied link must not fall back to the other
// browser's remembered view.
emit();
return () => {
clearTimeout(timer);
mapInstance.off("overlayadd", onAdd);