We have almost succeeded in re-wiring the My Government Services app for our own data. Only remaining issue is changing the geocoder.
I've investiged this thread from 1.5 years ago: Attempting to use custom locator with My Government Services
I'm still struggling to get ours working. It is not a composite geocoder, so I have commented out the last 2 lines out. This is what we have:
Locators: [{
DisplayText: "Search Address", //Set placeholder text
DefaultValue: "201 N STONE AV", // Set default address to search.
LocatorParameters: ["SingleKey"], // Set Locator fields (fields to be used for searching).
LocatorURL: "https://maps2.tucsonaz.gov/arcgis/rest/services/GISDATA_ADPARCEL_ADDRESS_MATCHER_WEB/GeocodeServer",
CandidateFields: "Score, Match_addr, Ref_ID, Addr_type", //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: 'Match_addr',//The returned field which specifies match type (specific locator within composite)
//LocatorFieldValues: ["Address", "Addr", "Address_1", "Customer_Address"] //List of acceptable individual locators (within composite)
}]
I've tried the Matchscore with and without a comma after it.
What we see in the map is simply 'No Results Found' - no errors or anything, just not finding anything.
The candidate fields are taken from the info on the rest services page for the geocoder service (it includes the shape field there for some reason, but did not include that in the candidate fields here). My only theory is that there's a projection problem, since our geocoder is in our local state plane, but I'm assuming the map/app is Web Mercator?
Thanks