How can I use the google maps API with a currently-valid version?


I’ve got an app that incorporates google maps. I call in the library with:


It ran OK for a year or so then one day raised a script error. I found this was because the version number was out-of-date, so I increased it to the current version. Then about a year later it happened again.

This time I changed it to ‘v=quarterly’ which I was told would always use a current stable version.

Today it’s crashed again with the script error. Can anyone tell me how to always invoke a current and stable version of the API?

Many thanks,
Tony Reynolds


I would suggest updating the other parameters you’re sending. Google Maps API currently requires 2 URL Params:

key: Your API key. The Maps JavaScript API will not load unless a valid API key is specified.

callback: The name of a global function to be called once the Maps JavaScript API loads completely.

An example of a valid API call would be

<script async

The version key is not required, and would default to weekly, but if you specify v=quarterly it will only use larger, less frequent updates.

Also, the sensor parameter is no longer used and is recommended you should remove it.

URL Params,
Sensor Param

Answered By – Barry Piccinni

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published