manish.kr

ESRI not able to reverse geocode on a latlon which is obtained even from another call of ESRI api

Discussion created by manish.kr on May 25, 2017
  • Description:
    • Searched “bhutan” with api findAddressCandidates?SingleLine which returned an address with lat long.
    • Now using same lat long found in above api response, fired api reverseGeocode to get address.
    • ESRI returns error saying “Unable to find address for the specified location.”
  •  ESRI Call:

http://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer/findAddressCandidates?SingleLine=bhutan&langCode=EN&maxLocations=1&forStorage=false&outFields=City,Region,Country,Postal&f=pjson

 

Response:

            candidates": [ 

                   {   "address": "Kingdom of Bhutan",  

                         "location": {    "x": 90.499999161000517,    "y": 27.499999510000464   },  

                         "score": 100,  

                         "attributes":

                                 {    "City": "",   

                                        "Region": "",   

                                        "Country": "BTN",   

                                        "Postal": ""   }

                        } ]

 

http://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer/reverseGeocode?location=90.499999161000517%2C+27.499999510000464&distance=200&outSR=&f=pjson

 

            "error": { 

                     "code": 400, 

                       "message": "Cannot perform query. Invalid query parameters.", 

                      "details": [   "Unable to find address for the specified location."  ] }

 

Outcomes