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:
co-authored by
Claude Opus 5.5
parent
afd2bc463d
commit
b6055019fc
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user