js-api-loader icon indicating copy to clipboard operation
js-api-loader copied to clipboard

Places: Failed to load Google Maps script in iOS devices from first attempt

Open anastasiia-nikita opened this issue 1 year ago • 2 comments

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)
		})
	}, []) 

anastasiia-nikita avatar Apr 17 '24 07:04 anastasiia-nikita

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:

This is an automated message, feel free to ignore.

wangela avatar Apr 17 '24 07:04 wangela