Correct address format to get the most accurate results from google GeoCoding API

前端 未结 6 850
南笙
南笙 2020-12-24 02:12

Is there any standard format to supply the address string to Google GeoCoding API to get the most accurate results on map.

For Eg. following query not giving correct

6条回答
  •  醉话见心
    2020-12-24 03:01

    Definition of Google address search:

    address - The street address that you want to geocode, in the format used by the national postal service of the country concerned. Additional address elements such as business names and unit, suite or floor numbers should be avoided.

    https://developers.google.com/maps/documentation/geocoding/#geocoding

    How should I format my geocoder queries to maximise the number of successful requests?

    The geocoder is designed to map street addresses to geographical coordinates. We therefore recommend that you format geocoder requests in accordance with the following guidelines to maximise the likelihood of a successful query:

    • Specify addresses in accordance with the format used by the national postal service of the country concerned.
    • Do not specify additional address elements such as business names, unit numbers, floor numbers, or suite numbers that are not included in the address as defined by the postal service of the country concerned.
    • Use the street number of a premise in preference to the building name where possible.
    • Use street number addressing in preference to specifying cross streets where possible.
    • Do not provide 'hints' such as nearby landmarks.

    https://developers.google.com/maps/faq#geocoder_queryformat

提交回复
热议问题