JustFly1984 / react-google-maps-api

React Google Maps API
MIT License
1.75k stars 421 forks source link

Autocomplete not working on android browser, after useJsApiLoader execute the isLoaded not turned to true #3320

Open tianzige886 opened 6 months ago

tianzige886 commented 6 months ago

Issue template

import { Autocomplete, useJsApiLoader } from "@react-google-maps/api"; export function Positions () { const { isLoaded, loadError } = useJsApiLoader({ googleMapsApiKey: "xxxxx", libraries: ["places"], id: "__googleMapsScriptId", });

  useEffect(() => {
    alert(isLoaded);
  }, [isLoaded])

}

Please provide an explanation of the issue

above code, the result of alert is false, isn't turned to true, so i think useJsApiLoader is not load api success. work fine in computer browser and ReactNative IOS environment, but not work in android device browser and app webview env. help me ~~~

Your Environment

os: android

node --v16.16.0

react version v18

webpack version 5

@babel version

@react-google-maps/api version

How does it behave?

How should it behave correctly?

Basic implementation of incorrect behavior in codesandbox.com