orcoastalmgmt / orSeaSketch

Repo for tracking issues with Oregon SeaSketch
1 stars 0 forks source link

Map Search Bar broken #1

Closed mmosesOCMP closed 4 years ago

mmosesOCMP commented 4 years ago

The Search Bar on the upper left of the map window should allow users to search for geographic locations, but it is not working - it does not seem to find any named locations.

tchaddad commented 4 years ago

from Josh Tanner (@tannerjt):

One thing I did notice by inspecting your requests through the app is that you’re using the wrong query parameter ‘PlaceName’ in the request. It should be ‘SingleLine’ for single line address requests, or broken out into ‘street’, ‘city’, ‘state’, ‘zip’ for multi-line request.

Here’s our docs:

https://navigator.state.or.us/arcgis/sdk/rest/index.html#//02ss00000015000000

Here is how SeaSketch is currently calling our geocoder:

https://navigator.state.or.us/arcgis/rest/services/Locators/gc_Composite/GeocodeServer/findAddressCandidates?PlaceName=155%20Cottage%20St%20NE%2C%20Salem%20OR&f=json&outSR=%7B%22wkid%22%3A102100%2C%22latestWkid%22%3A3857%7D&maxLocations=6

But it should instead use this format:

https://navigator.state.or.us/arcgis/rest/services/Locators/gc_Composite/GeocodeServer/findAddressCandidates?SingleLIne=155%20Cottage%20St%20NE%2C%20Salem%20OR&f=json&outSR=%7B%22wkid%22%3A102100%2C%22latestWkid%22%3A3857%7D&maxLocations=6

Notice the replaced ‘PlaceName’ query parameter with ‘SingleLine’.

tchaddad commented 4 years ago

Based on the above, we've decided to not use the Oregon geocoder, which is optimized for street address search, and instead use the esri worlwide geocoder, which includes place names.