Let me remember the map window #7638
qiaoxin136
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
i created react app that is controlled by a checkbox to show the basin. however, if user check the checkbox, the window of the map goes back to the original setting.
here is the codesandbox link.
https://codesandbox.io/s/solitary-fog-qjyomi
i think it is related to this portion of code using Ref,
useEffect(() => {
const map = new window.google.maps.Map(ref.current, {
options: options
});
// console.log(map);
const contentString = '
}, [roundtwo]);
Can anyone make some suggestion on how i can make some change to let the app remember the map window? Thanks.
Beta Was this translation helpful? Give feedback.
All reactions