Google Maps geocoding issues: some coded URLs

I am trying to get Lat / Lon for a list of locations from an address. It works for most addresses, but some of them fail and return zero results.

Take this address as an example: 1045 Mono Way, Sonora, CA 95370

As you can see, this is a valid address on Google Maps - no problem.

When checking Geocoder Api, I encode the address using urlencode(). This is the encoded address:1045%20Mono%20Way%2C%20Sonora%2C%20CA%2095370

This is the link I am referring to: https://maps.googleapis.com/maps/api/geocode/xml?address=1045%20Mono%20Way%2C%20Sonora%2C%20CA% 2095370 & sensor = false

As you can see, zero results.

Now, if you change the first part of the address (1045) to any other number (for example, 1044), you will get real results.

I'm lost.

Need help.

You are welcome;)

By the way, I use this answer to get lat / lon from the API: Google Maps - address translation to latitude and longitude - PHP backend?

+4
source share
1 answer

, . , , , . , (1045, 1047, 1049), (1044, 1046, 1048) , . , , , .

"" API, , , Maps. API-, "ZERO_RESULTS", .

, API, !

+2

Source: https://habr.com/ru/post/1526665/


All Articles