Attempting to use custom locator with My Government Services

2856
2
03-21-2014 08:35 AM
MichaelMorisette
New Contributor III
Hello

I'm a technician with the City of Fayetteville, AR.  We're currently in the process of setting up My Government Services for our city.  We've mostly gotten things to work, but are having trouble getting our own address locator to work with it.  As far as I know, the locator works with some of the other web apps we have (ones that are FLEX based).  I'm guessing the problem lies somewhere in the config file.  I've attempted several different values for "LocatorFieldValues," including ESRI defaults and several of our fields that would make sense with it, but have come up empty each time; the locator repeatedly says "no results found" for any valid address I enter.

Is there something obvious I'm missing here?

Here's the locator I'm attempting to use:
http://gis2.accessfayetteville.org/faygis/rest/services/Locators/FayettevilleCompositeLocator/Geocod...

Here's the section of the config.js file that pertains to it:
        Locators: [{
            DisplayText: "Search Address", //Set placeholder text
            DefaultValue: "113 W Mountain St Fayetteville AR 72701", // Set default address to search.
            LocatorParameters: ["SingleLine"], // Set Locator fields (fields to be used for searching).
            LocatorURL: "http://gis2.accessfayetteville.org/faygis/rest/services/Locators/FayettevilleCompositeLocator/GeocodeServer",
            CandidateFields: "Loc_name, Score, Match_addr", //Set which fields are returned in results
            DisplayField: "${Match_addr}", //Set which field from results is displayed
            AddressMatchScore: 80, //Set minimum score to be considered a match
            LocatorFieldName: 'Loc_name', //The returned field which specifies match type (specific locator within composite)
            LocatorFieldValues: ["House", "StreetName"] //List of acceptable individual locators (within composite)
        }]


Here's the test version of the app I'm working with:
http://gis2.accessfayetteville.org/myfayettevilleservicesGREG2/

Thanks
0 Kudos
2 Replies
AllisonMuise
New Contributor III
@ mmorisette

At a quick glance it looks like you are referencing fields in you composite locator for the LocatorFieldValues parameter. Despite it's name, I believe that this should be a list of the acceptable locators (not fields) from your composite locator.

The default values when configuring this app are "USA.StreetName", "USA.PointAddress", and "USA.StreetAddress" which are locators referenced by the World Geocode Service

To illustrate this with another locator, the composite locator for Naperville provided in LocalGovernment.gdb references the DualRange, SiteAddress, PlaceName, and StreetName locators also found in LocalGovernment.gdb. If you were to set this app up to reference a geocode service published from this composite locator, any combination of "DualRange", "SiteAddress", "PlaceName", and "StreetName" would be acceptable values for the LocatorFieldValues parameter. Other locators referenced by the composite would not be used.

Allison M
ArcGIS for Local Government
0 Kudos
MichaelMorisette
New Contributor III
That did the trick!  I looked up the components of our composite locator in ArcCatalog and put in those values.  Thank you very much for your help with this.