googlemaps / js-api-loader

Load the Google Maps JavaScript API script dynamically.
Apache License 2.0
351 stars 64 forks source link

Support refresh when the session is about to expire. #361

Open jpoehnelt opened 3 years ago

jpoehnelt commented 3 years ago

The API session token expires if someone leaves a map open for more than about 24 hours, so it's normal to see a low level of these errors. (This is the intended behavior)

Could automatically reset and load as necessary to better support certain app patterns.

jpoehnelt commented 3 years ago

Example use case for Vue: https://github.com/googlemaps/js-api-loader/issues/357#issuecomment-908521283 StackOverflow: https://stackoverflow.com/questions/54205790/notloadingapifromgooglemapserror-even-when-loading-correct-url

spaghettiguru commented 2 years ago

We are having issues with this too...

phongm commented 1 month ago

Hi @jpoehnelt , I have tried to do this, but it cannot recognize the correct apiKey now. :Google Maps JavaScript API error: InvalidKeyMapError. image

It seems that the & has been compiled, causing a key recognition error. Is there any solution?