Select to view content in your preferred language

My Government Services - Zip or City Only Search

2219
1
11-20-2013 04:48 AM
MaryEllen_Perko
Frequent Contributor
Hi.  This may be a stupid question, but we are looking at the My Government Services template for a statewide solution and are wondering how to change the locator configuration (we're using esri's service) to locate a city, state (e.g. Raleigh, NC) or zip code (e.g. 27604) in addition to a full address.  

Or does that even make sense for this template?

Thanks for the help.
0 Kudos
1 Reply
HeatherEisan1
Deactivated User
Mary,

You can deploy the my government services application as a statewide solution if it satisfies your business requirements. At 10.2 the My Government Services (this is the current version http://www.arcgis.com/home/item.html?id=23c7fd011b64434d87fb0aa607f2c049) you�??ll need to modify the Address Search Settings section in the configuration file. See my example below.

Locators: [{
            DisplayText: "Search Address", //Set placeholder text
            DefaultValue: "139 W Porter Ave Naperville IL 60540", // Set default address to search.
            LocatorParameters: ["SingleLine"], // Set Locator fields (fields to be used for searching).
            LocatorURL: "http://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer",
            CandidateFields: "Addr_type, Postal, 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: 'Addr_type', //The returned field which specifies match type (specific locator within composite)
            LocatorFieldValues: ["StreetAddress", "StreetName", "Postal", "POI"] //List of acceptable individual locators (within composite)
        }]


I changed Loc_name in the CandidateFields row to Addr_type and added Postal. I also changed the LocatorFieldName from LocName to Addr_type. Finally I removed USA.StreetName, USA.PointAddress, and USA.StreetAddress and replaced it with StreetAddress, StreetName, Postal and POI. Try the search out and see if it works for you. For more information about single input field geocoding go here http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Single_input_field_geocoding/02r3000...

Also, we have  more solutions designed for state government available here on our ArcGIS for State Government solution site http://solutions.arcgis.com/state-government/
0 Kudos