Closed
Description
The center
param seems to only be working as an initial value, when the value changes the map does not recenter, I have verified the field has been updating.
const mapCenter = useMemo(
() => ({
lat: ownItinerary?.destinations[0]?.lat || 0,
lng: ownItinerary?.destinations[0]?.lon || 0,
}),
[ownItinerary]
);
<GoogleMap
mapOptions={{
mapId: process.env.NEXT_PUBLIC_GOOGLE_MAPS_MAP_ID,
disableDefaultUI: true,
clickableIcons: true,
}}
style={{ width: "100%", height: "100%" }}
center={mapCenter}
zoom={5}
onLoad={() => console.log("Map Component Loaded...")}
>
</GoogleMap>
Metadata
Metadata
Assignees
Labels
No labels