Joe Cheng
Joe Cheng

Reputation: 9524

Why google.maps.Geocoder and Google Geocoding API return different results?

Google maps API V3 offers two ways to convert an address to a LatLng: google.maps.Geocoder class and Google Geocoding API. While I found that the two methods return different results when I tried to get the LatLng of the same address. And google.maps.Geocoder is more accurate as I have found. Why is that?

I need to make an application to get the LatLng of a list of addresses so the google.maps.Geocoder cannot help on this but the Google Geocoding API is not so accurate. Any ideas?

For example:

On the picture below, the red icon is the result of google.maps.Geocoder and the blue one is the result of Google Geocoding API. They are both from the address: "1 Xinjiekou North Street, Beijing, China"

Thank you!

enter image description here

Upvotes: 0

Views: 922

Answers (2)

geocodezip
geocodezip

Reputation: 161334

They both return the same coordinates for me:

http://www.geocodezip.com/v3_example_geo2.asp?addr1=1%20Xinjiekou%20North%20Street,%20Beijing,%20China&geocode=1

Xinjiekou 1st Alley, Xicheng, Beijing, China, 100035 (39.9416447, 116.37176850000003)

http://maps.googleapis.com/maps/api/geocode/json?address=1%20Xinjiekou%20North%20Street,%20Beijing,%20China&sensor=false

        "location" : {
           "lat" : 39.9416447,
           "lng" : 116.3717685
        },

Upvotes: 0

Dr.Molle
Dr.Molle

Reputation: 117334

It seems that the lat and lng of geometry.location will be rounded to a precision of 7 by the Geocoding-API.

Upvotes: 0

Related Questions