Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No candidates found issue #172

Open
steveoh opened this issue Nov 16, 2023 · 1 comment
Open

No candidates found issue #172

steveoh opened this issue Nov 16, 2023 · 1 comment

Comments

@steveoh
Copy link
Member

steveoh commented Nov 16, 2023

Alex @agilvarry from UDOT was integrating masquerade into a web application and notice that if he typed Salt Lake County and hit enter, no candidates were returned.

Generated URL

https://masquerade.ugrc.utah.gov/arcgis/rest/services/UtahLocator/GeocodeServer/findAddressCandidates?Single Line Input=Salt Lake County&maxLocations=6&outFields=*&outSR="latestWkid":3857&f=json

Response

{"candidates":[],"spatialReference":{"latestWkid":3857,"wkid":102100},"status":200}

However, if you wait for the drop down to show Salt Lake County and click it with the mouse or hit the down arrow and enter a different request is generated and the request works as expected.

Generated URL

https://masquerade.ugrc.utah.gov/arcgis/rest/services/UtahLocator/GeocodeServer/findAddressCandidates?Single Line Input=Salt Lake County&magicKey=29-opensgid.boundaries.county_boundaries&maxLocations=6&outFields=*&outSR={"latestWkid":3857,"wkid":102100}&f=json

Response

{"candidates":[{"address":"Salt Lake County","attributes":{"Match_addr":"Salt Lake County","OpenSGID Table":"opensgid.boundaries.county_boundaries","Score":100,"color4":4,"countynbr":"18","entitynbr":"2010181010.00000000","entityyr":"2010.00000000","fips":"35.00000000","fips_str":"49035","globalid":"b31fdc39-6c17-40db-b45c-e0df37a0573f","name":"SALT LAKE","pop_currestimate":1186257,"pop_lastcensus":1185238,"stateplane":"Central","xid":29},"extent":{"xmax":-12418044.1286655,"xmin":-12496743.553381,"ymax":5000822.8618586,"ymin":4926311.93595986},"location":{"x":-12459279.9167366,"y":4963382.96598803},"score":100}],"spatialReference":{"latestWkid":3857,"wkid":102100},"status":200}

Is it required that you click on a matched record? Otherwise typing it in appears to hit the geocoder as it doesn't know what layer to query. Is this the same experience when not using masquerade with the locate widget?

@stdavis
Copy link
Member

stdavis commented Nov 16, 2023

This does not surprise me. I send the single-line input requests directly to the geocode service unless there's a magic key which is associated with the drop down item. Maybe I should be querying OpenSGID for single-line input requests as well? Currently, single-line input goes to the geocoder, but get candidates (for type-ahead/dropdown) queries OpenSGID.

@stdavis stdavis removed their assignment Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants