Custom Geocoding Service not working with AGOL "basicviewer" web app

762
4
12-06-2013 02:43 PM
WilliamRice
Occasional Contributor II
I have downloaded and configured the ArcGIS Online "basicviewer" web application on an external web server.  I have configured the application to work with a custom ArcGIS REST geocoding service running on this web server.  I am not able to get the basicviewer "search" tool to work with this geocoding service.  Using the Debugging tools with Firefox and inspecting the URL that the basicviewer search tool is passing to the geocoding REST service, I believe that the search tool is incorrectly passing the parameter "&Single Line Input=" when instead I believe the correct parameter should be "&SingleLine=".

Has anyone found a work around for the search tool on the AGOL basicviewer web application to use the search tool with a custom (non-ESRI) geocoding service?
Tags (2)
0 Kudos
4 Replies
SamanthaEdwards
New Contributor II
I am having the same issue. It was working fine, then I downloaded the most recent update and the search function is now using the original "World" geocoder.
0 Kudos
IanWittenmyer
Esri Contributor
based on what you are describing, it sounds like you need to modify the helperServices section of the config/commonConfig.js file to include the singleLineFieldName, and set placefinding to true.  here is an example:

geocode: [{url: location.protocol + "//<yourserver>/arcgis/rest/services/GEOCODE/GeocodeServer",
        name: "Test Geocoder",
        singleLineFieldName: "SingleLine",
        placefinding: true
                                                 }]
0 Kudos
SamanthaEdwards
New Contributor II
I tried that suggestion and the search function still pulls from the default geocoder.
0 Kudos
TerriRogers
New Contributor II
I don't know but I was having a similar problem.

I got it resolved by

In order to get the geocoder to work in the basic viewer in ArcGIS Online, Annonymous Access would need to be enabled.  To do this we would do the following:

In the organization go to Edit Settings > Security > Check on Allow Anonymous access to your organization.

I hope this helps!
0 Kudos