The url shown in your screenshot returns the following message along with the 403 code:
The Google Maps Platform server rejected your request. You must enable Billing on the Google Cloud Project at https://console.cloud.google.com/project/_/billing/enable Learn more at https://developers.google.com/maps/gmp-get-started
You therefore have to do three things, in you code and on the Google cloud console:
- Ensure that you trap and report any error message returned from the api in order to better understand the response code.
- Cancel the api key that you have now published to the world and generate a new one for the Google maps api, in cloud console.
- Enable billing on your project otherwise Google maps api will never work as it is a chargeable service.
Hope this helps. As I said, NEVER publish api keys nor store them on GitHub or similar.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…