Does the Google Maps Javascript API have a property/method that returns its exact version number?
I need this info for debugging purposes.
Does the Google Maps Javascript API have a property/method that returns its exact version number?
I need this info for debugging purposes.
I suppose the G_API_VERSION
could do :
This constant specifies the version of the API currently being served to your page.
I've just tested on two sites, and it contained things like "193c"
and "140g"
.
When you include Google Maps API you can choose version of it. Example:
<script type="text/javascript" src="http://www.google.com/jsapi?key=LONG_KEY_HERE"></script>
<script type="text/javascript">
/*<![CDATA[*/
google.load('maps', '2');
/*]]>*/
</script>
Here we want to use version 2 of Google Maps API.
In the Maps API v2, G_API_VERSION is what you want. For example, 193c means its loading v2.193c, 140g means 2.140g.
Changelog is here: http://code.google.com/p/gmaps-api-issues/wiki/JavascriptMapsAPIChangelog