-
-
Notifications
You must be signed in to change notification settings - Fork 464
Closed
Description
Marker is not rendering on localhost using @react-google-maps/api@2.10.2
However, after downgrading to @react-google-maps/api@2.7.0, the Marker is displayed on the map.
Here is the code snippet I am using:
function Map() {
const position = useMemo(() => ({ lat: 44.426765, lng: 26.102537 }), []);
const { isLoaded } = useLoadScript({
googleMapsApiKey: process.env.REACT_APP_GOOGLE_MAPS_API_KEY,
});
if (!isLoaded) return <div> Loading Maps... </div>
return (
<GoogleMap
zoom={10}
center={position}
mapContainerStyle={{ width: '400px', height: '400px'}}
>
<Marker position={position} />
</GoogleMap>
);
}
Environment
os: Linux
node --version: v16.13.0
react version: 18
@react-google-maps/api version: 2.10.2
leidto and Shaker-Hamdi
Metadata
Metadata
Assignees
Labels
No labels