My Gov't Services w/ WAB - reverse Geocoding?

1287
6
10-13-2016 04:16 PM
AllenScully
Occasional Contributor III

Love the new version using WAB with the Near Me widget.  Basically ready to deploy (very easy to configure).  However, the 'Searched Location' box that pops up next to the pin, when you click on the map for a location (instead of searching for a specific address) never populates.  This looks like a reverse geocoding kind of thing, wondering if it's in the geocoder itself (we're using our own) or an issue with configuring the app/widget.  The regular address search works perfectly, so our geocoder is valid and working.

Thanks - 

Allen

0 Kudos
6 Replies
LindsayThomas
Esri Contributor

Hi Allen, Do you have a reverse geocoder operation on your Custom Geocoder?  The easiest way to check it to go to the REST endpoint of the geocoder (for example: https://YOURSERVER/arcgis/rest/services/World/GeocodeServer/reverseGeocode ) and look for the reverseGeocode at the very end of the page. 

-Lindsay

0 Kudos
AllenScully
Occasional Contributor III

Thanks Lindsay - 

Our Geocode service does allow reverse geocoding - if you submit a reverse geocode request directly through the REST endpoint, it returns correct results.  

I've opened a case w/ ESRI on this, and can post the solution when we figure it out.  Current theory is that this is related to coordinate systems.

Allen

YeonKim
New Contributor III

Allen,

Did you figure it out? I am using Near Me widget in WAB too. The app is set with our own basemap (and thus the local projection) while we are still using ESRI's world geocoder. Regular geocoding works, but reverse geocoding is not..

Would you  share your findings. Thanks!

Yeon

0 Kudos
AllenScully
Occasional Contributor III

Hi Yeon - 

The ticket w/ ESRI is still being researched, no resolution yet.  We have tried reprojecting the source data for our Locator service into several different systems - Web Mercator, World Aux. Sphere - and get the same results.  Our basemaps are in Web Mercator so I had hoped that a Locator based on a Web Mercator dataset would fix this.

What's interesting is that ESRI world geocoder does work correctly on our app, but you need to specify city and/or zipcode as well. 

I'll update here once it's resolved

Allen

0 Kudos
YeonKim
New Contributor III

Allen,

I took some time to read the code and it seems it is a bug. In my setting (using ESRI locator but local coordinate base map), a pair of local coordinates are generated when a point is clicked.

The x, y values have to be reprojected first to web Mercator coordinates before changing to lat, long values (to be fed back to the ESRI locator for reverse-geocoding), but the code was not checking for/performing 'reprojection' step.

I hope they plan to fix this soon?

I am curious if the ESRI support came up with a work-around. 

Thanks for keeping posted!

Yeon

0 Kudos
AllenScully
Occasional Contributor III

Hi Yeon - 

So we have, to a degree, figured this out.  My organization is currently stuck at 10.3.1 versions of both desktop and server (hope to change as soon as possible).  However we have a test machine with 10.4 versions of desktop and server on it.  When we build a locator in 10.4, and publish it in 10.4 (with data reprojected to Web Mercator - haven't tried building a locator in our local system in 10.4) the Near Me widget in WAB does return the correct address.  Currently this is the extent of the information I have, but once I talk to the ESRI support analyst to close this out, I'll add any new details.  

Allen