Esri / crowdsource-reporter

An ArcGIS Online group application template authored by organization and made available to constituents to report a problem or observation.
http://solutions.arcgis.com/local-government/help/crowdsource-reporter/
Apache License 2.0
25 stars 32 forks source link

locator countrycode setting not respected #467

Closed lvdburgt closed 3 years ago

lvdburgt commented 4 years ago

Defining a countrycode in the search settings does not have any effect

aparveen commented 3 years ago

Similar issue is reported by Support **Already configured-application included below with URLs. Along with official documentation on country code behaviors, as well as a Video including the behavior's issue is attached to this case for visualization purposes.

  1. Create a Crowdsource Reporter application in ArcGIS online by going to Content > Create > Configurable Apps > Create a Crowdsource Reporter application
  2. Under the General tab, select an appropriate group the application can reference for web maps and feature layers
  3. Under the Search tab, make sure the enable Search tool is check on, then select the Edit button next to the ArcGIS World Geocoding Service
  4. In the ArcGIS World Geocoding Service pane, increase the Maximum Suggestions to 10 and add 'NZL' as the Country Code > Save
  5. Under the Access tab, un-check the 'Allow Anonymous access', leaving only the' Allow users to sign in using ArcGIS Online' checked on. Then go ahead and Save the entire application by clicking on the lower-left corner button.
  6. Launch the Application and attempt to search 'st asaph' in the search bar, while having Developer Tools open to capture web traffic.
  7. In DevTools, copy the last findAddressCandidates request url and paste the url into a new tab in the internet browser.

    • Notice that the response text includes the country code GBR, indicating that the search is not filtering to the country code as configured, but to other countries like Great Britain/United Kingdom
    • To filter based on country code, the url can be dissected to include the country code. Before the 'outFields' portion of the url, add '&countrycode=NZL&' then hit Enter. The response text is now filtered to only show searched for 'st asaph' under the NZL country code
    • This issue is seen in both local and web mercator projections

Web Mercator CrowdSource Reporter application: https://ess.maps.arcgis.com/home/webmap/configureApp.html?folderid=6bcdf702218543a2891a97fb7825746f&appid=a132d65716ce41668d097ba606bb9973

Local Projection CrowdSource Reporter application: https://ess.maps.arcgis.com/home/item.html?id=bf0f7bc1eee84a1ba26acf71227bc0ff

Country code documentation: https://developers.arcgis.com/rest/geocode/api-reference/geocode-coverage.htm

Work Around: Add the country code into the URL by including '&countrycode=COUNTRYcode&' before the outFields URL portion.

ashishchoure commented 3 years ago

@aparveen

We have analysed the issue and here is our approach to resolve the same :

image

image

ashishchoure commented 3 years ago

@aparveen @skrishn

Developer Checklist :

Items ​ Is required​ Status Comments​
Required NLS change?​ No NA
Required Backward compatibility​? No NA  
Required 508​? No NA  
Need Sanitize?​ No NA

Impact Analysis Report :**

Impacted Areas Comments
Have Configuration changes?​ No
Have Runtime changes?​ Yes
Impact on RTL No
Search functionality on the Main map and Geo form map The code changes for this ticket are impacting the search component on the main map and geo form map. Both of them should honor the country code (If configured) and accordingly return the results.
skrishn commented 3 years ago

@ashishchoure : Country Code text is hyperlink? Can we add moe than one country in it?

ashishchoure commented 3 years ago

@skrishn

CSR_Desktop

skrishn commented 3 years ago

@ashishchoure : Got it, thanks. Proceed with the fix.

aparveen commented 3 years ago

Related to BUG-000132354

aparveen commented 3 years ago

Verified in QA