-
-
Notifications
You must be signed in to change notification settings - Fork 443
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Map is not loaded correctly #3390
Comments
@hoangviet1112 please look at your browser logs for errors. Also please do not post unformatted code. Provide a link to minimal reproduction in codesandbox.io for example |
Hi @JustFly1984, sorry for my issue format, I have updated the issue and here is the link CodeSandbox, please help to check why this component cannot render Map correctly. |
@hoangviet1112 first make your file js-> jsx because you are working html also `import { useCallback, useState } from "react"; const locations = [ const center = { const containerStyle = { export function NewMapBox() { const [map, setMap] = useState(null); return ( {isLoaded && ( {/* {locations.length && ( {(clusterer) => { clusterer.clearMarkers(); return ( <> {locations.map((location) => ( <Marker clusterer={clusterer} key={ ${location.lat} ${location.lng} }noClustererRedraw={true} position={{ lat: location.lat, lng: location.lng, }} /> ))} </> ); }} )} */} )} ); }` |
The code is typescript, but you are trying to run it as javascript. x at the end of extension signaling that fail contains JSX |
Please provide an explanation of the issue
I have this component but the map is not loaded correctly, can someone help to figure out what is happened?
Your Environment
os: mac/windows
node --version 17
react version 18
webpack version
@babel version
@react-google-maps/api version ^2.19.3
How does it behave?
How should it behave correctly?
Basic implementation of incorrect behavior in codesandbox.com
Here is the result of this component
The text was updated successfully, but these errors were encountered: