Difference results between Geocoding services and search on gMap

自作多情 提交于 2019-12-05 14:21:51

Boulevard de la Marne Zone industrielle, COULOMMIERS, 77120, France is not an address, it is a "place".

The geocoder finds the location of Via De La Marne from that input:

http://www.geocodezip.com/v3_example_geo2.asp?addr1=Boulevard de la Marne Zone industrielle, COULOMMIERS, 77120, France&geocode=1

Found 1 results for Boulevard de la Marne Zone industrielle, COULOMMIERS, 77120, France
[ 0 ]: Av De La Marne, Bamako, Mali (12.6417952, -7.988396299999977)

The first result from the Places API looks more correct:

http://www.geocodezip.com/v3_example_geo2.asp?addr1=Boulevard de la Marne Zone industrielle, COULOMMIERS, 77120, France&place=1

Found 20 results for Boulevard de la Marne Zone industrielle, COULOMMIERS, 77120, France
[ 0 ]: Zone Industrielle, Boulevard de la Marne, Coulommiers, France (48.804329, 3.0923729999999523)
[ 1 ]: Boulevard de la Marne, Coulommiers, France (48.803048, 3.092110000000048)
[ 2 ]: 21 Boulevard de la Marne, Coulommiers, France (48.806634, 3.0937430000000177)
...

2 things are at play here.

"Boulevard de la Marne Zone industrielle, COULOMMIERS, 77120, France" is not recognized as an address by the Geocoding API because of the "Zone industrielle" part. If you remove that part, it works just fine:

Boulevard de la Marne, COULOMMIERS, 77120, France

Also, I found what looks like (a rare example of) an issue in Google Maps data, but I don't think fixing it would help with the above issue.

The place is found by Places API Text Search:

https://maps.googleapis.com/maps/api/place/textsearch/json?radius=50000&location=0,0&query=Boulevard%20de%20la%20Marne%20Zone%20industrielle,%20COULOMMIERS,%2077120&key=YOUR_API_KEY

You'll notice that there is no route component in address_components when querying for Places Details by its place_id. This indicates that the place is not properly associated with the road.

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