js-api-loader
js-api-loader copied to clipboard
Places: Failed to load Google Maps script in iOS devices from first attempt
Hi, there. I am using the @googlemaps/js-api-loader (v: 1.16.2) package in a React/Next app. I am noticing that for many users in our app that use iOS devices failed to load places library from first attempt. Do you have some problem with compatibility with iOS?
The way I import the library is:
const options = {
id: 'google-map-script',
apiKey: googleMapsApiKey,
language: 'en',
region: 'EN',
version: 'weekly',
}
useEffect(() => {
new Loader(options).importLibrary('places')
.then(() => {
dispatch(setGoogleMapsScriptLoaded(true))
}).catch(e => {
console.error('Google map loading failed:', e)
})
}, [])
If you would like to upvote the priority of this issue, please comment below or react on the original post above with :+1: so we can see what is popular when we triage.
@anastasiia-nikita Thank you for opening this issue. 🙏 Please check out these other resources that might help you get to a resolution in the meantime:
- Check the issue tracker - bugs and feature requests for Google Maps Platform APIs and SDKs
- Open a support case - Get 1:1 support in Cloud Console.
- Discord - chat with other developers
- StackOverflow - use the
google-mapstag
This is an automated message, feel free to ignore.