Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I access the version number of the Google Maps API in Javascript?

Does the Google Maps Javascript API have a property/method that returns its exact version number?

I need this info for debugging purposes.

like image 261
fbuchinger Avatar asked Feb 22 '10 12:02

fbuchinger


2 Answers

To acccess exact version of Google Maps API one can check google.maps.version

like image 200
Serzhas Avatar answered Oct 22 '22 14:10

Serzhas


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.

like image 25
Sergey Kuznetsov Avatar answered Oct 22 '22 15:10

Sergey Kuznetsov