I'd like to set my own geocoder for the My Government Services App (v10.2). As I understand this is possible, as the configuration is there now in 10.2.This is the standard code that the app comes with:
Locators: [{
DisplayText: "Search Address",
DefaultValue: "ADDRESS", // Set default address to search.
LocatorParamaters: ["SingleLine"], // Set Locator fields (fields to be used for searching).
LocatorURL: "http://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer",
CandidateFields: "Loc_name, Score, Match_addr",
DisplayField: "${Match_addr}",
AddressMatchScore: 80,
LocatorFieldName: 'Loc_name',
LocatorFieldValues: ["USA.StreetName", "USA.PointAddress", "USA.StreetAddress"]
}]
I was thinking that I could just input my own locator service, and update the LocatorFieldValues so that it references the fields on my locator and be done, like this:
Locators: [{
DisplayText: "Search Address",
DefaultValue: "ADDRESS", // Set default address to search.
LocatorParamaters: ["SingleLine"], // Set Locator fields (fields to be used for searching).
LocatorURL: "http://MyServer/arcgis/rest/services/Whatever/GeocodeServer", //My locator
CandidateFields: "Loc_name, Score, Match_addr",
DisplayField: "${Match_addr}",
AddressMatchScore: 80,
LocatorFieldName: 'Loc_name',
LocatorFieldValues: ["StreetName", "HouseNumber", "StreetAddress"] //References my locator
}]
But it doesnt work...any suggestions?