Google GeoCoding API - returns ZERO_RESULTS but the location shows on Google Maps

核能气质少年 提交于 2019-12-02 01:38:17

问题


I am using Google GeoCode API to search a location from an address and get LAT, LON information of that location.

From the API I always get ZERO_RESULTS where as if I search the address from the Google Maps, It shows me the location

The address I search for is,

5989 Route 6N, Edinboro, Pennsylvania, 16412, United States

Below given is the request that I sent to Google API,

https://maps.googleapis.com/maps/api/geocode/json?address=5989%20Route%206N%20Edinboro%20Pennsylvania%20United%20States%2016412&key={{API_KEY}}

Can anyone help me on resolving this?

Thanks!


回答1:


This was an issue in the Geocoding API: Issue 11031.

It has been fixed as of this week, so that Geocoding API will always return the same result/s as Google Maps:

https://maps.googleapis.com/maps/api/geocode/json?address=5989%20Route%206N%20Edinboro%20Pennsylvania%20United%20States%2016412

 "formatted_address" : "5989 Route 6n, Edinboro, PA 16412, USA",


来源:https://stackoverflow.com/questions/41500751/google-geocoding-api-returns-zero-results-but-the-location-shows-on-google-map

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!