Google Maps Web site and API : different results

2019-01-12 03:39发布

问题:

Why do calls to the Google Maps Geocoder API return different results than what I see in my browser?

This one returns many items :
http://maps.google.fr/maps?q=McDonald,+paris

This one returns a ZERO_RESULT :
http://maps.googleapis.com/maps/api/geocode/xml?McDonald,+paris&sensor=false

回答1:

FAQ: https://developers.google.com/maps/faq#geocoder_differences

The API geocoder finds postal addresses. The Maps geocoder uses lots of data, including business data, to find results.

There is the Places API which can find locations based on type/class, but it may not work for business names. Documentation