Domanda

Google Geocode API is not returning result for certain locations. One of them is

Perkins Restaurant & Bakery, East Fowler Ave, Tampa, FL

Below is link of result API returns for this location.

https://maps.googleapis.com/maps/api/geocode/json?address=Perkins%20Restaurant%20&%20Bakery,%20E%20Fowler%20Ave,%20Tampa,%20FL,%20United%20States&sensor=true

Has anyone faced this issue? I don't provide components parameter so search result should not be restricted to any geographical area.

È stato utile?

Soluzione

"You need to replace & in the address argument by its URL-encoding %26"

See https://stackoverflow.com/a/6979738/189804

With the ampersand:

{ "results" : [], "status" : "ZERO_RESULTS" }

With %26 encoding:

    {
   "results" : [
      {
         "address_components" : [
            {
               "long_name" : "2301",
               "short_name" : "2301",
               "types" : [ "street_number" ]
            },
            {
               "long_name" : "East Fowler Avenue",
... and so on ...
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top