i have a requirement where i just need to fetch the Latitude and Longitude by giving address here is the two different versions of Google Maps Geocoding API URL i used which outputs almost the same result.
http://maps.google.com/maps/geo?output=xml&key=MyApiKey&oe=utf-8&q=Bhatkal,%2CKarnataka,%2CIndia
http://maps.googleapis.com/maps/api/geocode/xml?sensor=false&address=Bhatkal,%2CKarnataka%2C,India
the first one is with API Key and the Second one without the API Key. i would like to know
a) Why do i need to use the API key when i could fetch the result without defining the key.
b) Which one is more feasible API for my Purpose of just fetching latitude and longitude..
The first URL is for v2 of the Geocoding API, the second is for v3.
v2
Which one to use depends (at least in part) on what environment you're going to use it in - if you want to use it in a webpage with JavaScript, you'll have to use v2 since it has JSONP support (unless you want to add a server-side component to get around cross-domain issues). An alternative for JavaScript is the JavaScript API Geocoder service.
If you're using the API in a desktop app or on the server-side, you can use either but v3 would be recommended.
v3 also has a higher query limit (2500 requests per day) as compared to v2 (1500 requests per day)
The first URL is of Google Maps v2 and the second of Google Maps v3 .
v2 is deprecated , but that doesn't mean you can't it use it , it only
indicates that "Google will continue fix bugs for 3 yrs if any ,
but no
new features will be added .
You can continue using it even after that
period ."
1)Google Maps v3 doesn't support JSONP
2)Google Maps v2 has higher geocoding limit 15000 and not (1500)
while Google Maps v3 has 2500 geocoding limit .
3) Google Maps v2 supports 4 output formats
https://code.google.com/apis/maps/documentation/geocoding/v2/index.html
4)Google Maps v3 supports only 2 formats json and kml
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With