what3words / w3w-arcgis-webappbuilder-widget

what3words reverse geocoding widget for ArcGIS Web AppBuilder https://what3words.github.io/w3w-arcgis-webappbuilder-widget/WebApp-what3words/
MIT License
4 stars 3 forks source link

Widget does not return any results - coordinate system issue? #6

Closed StephStedman closed 3 years ago

StephStedman commented 3 years ago

Hi there Thanks for these great and easy instructions to follow for this widget. However when I have added the widget to existing or new apps in WebAppBuilder and clicked on a location no results are shown. See here trying to locate in Trafalgar Square, London. image

We are running WAB 2.12.

I work at Transport for London and we use our own Coordinate Reference System for London. Could this be why I'm not seeing any results because the CRS is not registered so the widget maybe doesn't know where it is? This is just a guess, but is normally the cause of most issues I have! If you think this is the case, do you think I can get our "London Survey Grid" added to the widget?

Or if you have any other ideas for why I'm not seeing any results?

Thanks in advance

Steph

andycurriew3w commented 3 years ago

Hi Steph,

Thanks for contacting us. The widget hadn't been updated to the latest version of our API (V3). This change has now been merged so I think this will be more likely to work now as V2 requests are now automatically blocked.

With regards to the coordinate system, I can see the widget does some coordinate system transformation before it sends off to our API https://github.com/what3words/w3w-arcgis-webappbuilder-widget/blob/0fd92e524ee0544f2d1e5f6f85ca1f318a2db969/w3wwidget/Widget.js#L97 but I'm not certain this will work for your CRS.

Would you be able to try again with the API V3 updated widget and see if you have any luck with getting back a 3 word address that matches the same location as our map site? If not perhaps, if possible, if you could publish your test app somewhere I can access and send it to support@what3words.com so I can see what requests are being sent to our API in dev tools.

Thanks

Andy Currie

StephStedman commented 3 years ago

Hi Andy Yes that worked! Thanks so much for your help. I deleted all the files I had on my WAB installation & the old W3W widget I had in my app. I downloaded everything again from this site, followed the install instructions again and hey presto working now! Our custom coordinate system doesn't seem to an issue at all. Cheers Steph

tsamaya commented 3 years ago

Hi Steph, ArcGIS for Portal or ArcGIS Online will always project the coordinates from the national/custom reference system to a WGS-84 equivalent. used to be 102100 replaced later by 102113 but seems also to be deprecated (https://epsg.io/102113). Then the coordinates picked up by the widget are in WGS-84, which is fine as the w3w API is expecting this reference system. Cheers Arnaud

andycurriew3w commented 3 years ago

Hi Steph,

Great to hear it's working! I'll close the ticket. Any further problems if you could contact support@what3words.com or James and he'll pass on.

@tsamaya Thanks for your help - I hoped this might be the case! Hope you are well.

Thanks

Andy