How to get the equivalent of the accuracy in Google Map Geocoder V3

前端 未结 3 2032
说谎
说谎 2021-01-03 09:46

I want to get geocode from google, and I used to do it with the V2 of the API. Google send in the json a pretty good information, the accuracy, reference here : http://code.

3条回答
  •  盖世英雄少女心
    2021-01-03 10:20

    Well, there is the location type, which is not so bad :

    location_type stores additional data about the specified location. The following values are currently supported:

    "ROOFTOP" indicates that the returned result is a precise geocode for which we have location information accurate down to street address precision.

    "RANGE_INTERPOLATED" indicates that the returned result reflects an approximation (usually on a road) interpolated between two precise points (such as intersections). Interpolated results are generally returned when rooftop geocodes are unavailable for a street address.

    "GEOMETRIC_CENTER" indicates that the returned result is the geometric center of a result such as a polyline (for example, a street) or polygon (region)."

    "APPROXIMATE" indicates that the returned result is approximate.

    I test if the location_type is different of approximate, and it gives some good results.

提交回复
热议问题