Skip to content
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

Multiple google components on same project #192

Closed
jacobpastorek opened this issue Dec 2, 2022 · 1 comment
Closed

Multiple google components on same project #192

jacobpastorek opened this issue Dec 2, 2022 · 1 comment

Comments

@jacobpastorek
Copy link

Hello, I have multiple libraries that use google services, yours and google-map-react

if content of google-map-react loads first this error will occur when i try to use autocomplete input ->

Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'AutocompleteService') at buildService (usePlacesAutocompleteService.js:110:1) at usePlacesAutocompleteService.js:118:1

if react-google-autocomplete is loaded first,
map shown by second library doesn't have markers and another warnings occur.
is there possibility to somehow initialize all google services first, than use both libraries at the same time ?

in both of them is place for "API_KEY" in their components so i'm guessing the problem is loading same services twice?

Thanks

@jacobpastorek
Copy link
Author

found solution here: Solution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant