Reputation: 4514
Does the Google Maps Javascript API have a property/method that returns its exact version number?
I need this info for debugging purposes.
Upvotes: 10
Views: 10769
Reputation: 914
To acccess exact version of Google Maps API one can check google.maps.version
Upvotes: 20
Reputation: 2417
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
Upvotes: 0
Reputation: 8721
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.
Upvotes: 2
Reputation: 401052
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"
.
Upvotes: 0