MCPcopy Create free account
hub / github.com/Thanas-R/Virdis / loadMapPosition

Function loadMapPosition

src/components/MapView.tsx:26–29  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

24 const center = map.getCenter();
25 localStorage.setItem(MAP_POS_KEY, JSON.stringify({ lng: center.lng, lat: center.lat, zoom: map.getZoom(), bearing: map.getBearing(), pitch: map.getPitch() }));
26}
27
28function loadMapPosition() {
29 try { const s = localStorage.getItem(MAP_POS_KEY); if (s) return JSON.parse(s); } catch {}
30 return DEFAULT_INDIA_VIEW;
31}
32

Callers 1

MapViewFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected