-
-
Notifications
You must be signed in to change notification settings - Fork 447
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
Loading google maps JS API #3334
Comments
Wow, I've been just looking for this feature :O |
You must update to the latest version and replace useLoadScript with the newer useJsApiLoader import { useJsApiLoader } from "@react-google-maps/api"; |
@rhadooqoo I'm not sure that solves the problem because this library is still using v1.16.2 of @googlemaps/js-api-loader, but that library only fixed |
@sderrow Updated to latest version and it worked for me. Thanks @nitya-nalamari 👍 |
This issue should be closed since it is resolved. |
Did not work for me (updated to 2.19.3). For now, injecting with the API key till the library is updated. googleMapsApiKey: `${import.meta.env.VITE_GOOGLE_MAP_KEY}&loading=async`, |
@Vitallyz The fix you mentioned is what I am currently using as well 😅 |
The following warning has started to appear when using the following @react-google-maps/api/src/LoadScriptNext.
Google Maps JavaScript API has been loaded directly without loading=async. This can result in suboptimal performance. For best-practice loading patterns please see https://goo.gle/js-api-loading
Is their a fix for this?
The text was updated successfully, but these errors were encountered: