You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the onLoad keeps getting this error:
No overload matches this call.
Overload 1 of 2, '(props: GoogleMapProps | Readonly): GoogleMap', generated the following error.
Type '(map: GoogleMap) => void' cannot be assigned to type '(map: Map) => void | Promise'.
Types of parameters 'map' and 'map' are incompatible.
Type 'Map' has no properties in common with type 'GoogleMap': state, registeredEvents, mapRef, getInstance, and 11 more.
Overload 2 of 2, '(props: GoogleMapProps, context: any): GoogleMap', generated the following error.
Type '(map: GoogleMap) => void' cannot be assigned to type '(map: Map) => void | Promise'.ts(2769)
index.d.ts(78, 5): The expected type comes from property 'onLoad', which is declared here in type 'IntrinsicAttributes & IntrinsicClassAttributes & Readonly'
index.d.ts(78, 5): The expected type comes from property 'onLoad', which is declared here in type 'IntrinsicAttributes & IntrinsicClassAttributes & Readonly'
I'm using the latest version of react-google-maps/api. My only choice is getting to the map a any, but it doesn't will deploy correctly with this error.
The text was updated successfully, but these errors were encountered:
on the code of a map:
`const mapRef = useRef<GoogleMap | null>(null)
const center = useMemo(() => ({
lat: -19.947128,
lng: -45.165717
}), [])
const options = useMemo(() => ({
mapId: 'd78eeda2034f463a',
clickableIcons: false,
}), [])
const onLoad = useCallback((map: GoogleMap) =>{ mapRef.current = map}, [])
return
Commute?
<Places setOffice={(position) => {
setOffice(position)
mapRef.current?.panTo(position)
}} />
the onLoad keeps getting this error:
No overload matches this call.
Overload 1 of 2, '(props: GoogleMapProps | Readonly): GoogleMap', generated the following error.
Type '(map: GoogleMap) => void' cannot be assigned to type '(map: Map) => void | Promise'.
Types of parameters 'map' and 'map' are incompatible.
Type 'Map' has no properties in common with type 'GoogleMap': state, registeredEvents, mapRef, getInstance, and 11 more.
Overload 2 of 2, '(props: GoogleMapProps, context: any): GoogleMap', generated the following error.
Type '(map: GoogleMap) => void' cannot be assigned to type '(map: Map) => void | Promise'.ts(2769)
index.d.ts(78, 5): The expected type comes from property 'onLoad', which is declared here in type 'IntrinsicAttributes & IntrinsicClassAttributes & Readonly'
index.d.ts(78, 5): The expected type comes from property 'onLoad', which is declared here in type 'IntrinsicAttributes & IntrinsicClassAttributes & Readonly'
I'm using the latest version of react-google-maps/api. My only choice is getting to the map a any, but it doesn't will deploy correctly with this error.
The text was updated successfully, but these errors were encountered: