-
Notifications
You must be signed in to change notification settings - Fork 9
Geocoder
andy.rothwell edited this page Aug 25, 2018
·
3 revisions
Here you enter all necessary details for a geocoder service. The service used must return be accessible through an http-get call, and it must return results in standard JSON.
For any apps built by the City of Philadelphia, the geocoder used should be AIS (Address Information Service). Using AIS requires submitting a "gatekeeperKey" as a parameter, so that the City can track which apps are making each call to AIS. You must request a gatekeeperKey from OIT, and put it into your config. It will be passed to the the baseConfig as opts.gatekeeperKey, which you can use in your params.
Example:
geocoder: {
url: function (input) {
var inputEncoded = encodeURIComponent(input);
return '//api.phila.gov/ais/v1/search/' + inputEncoded;
},
params: {
gatekeeperKey: opts.gatekeeperKey,
include_units: true,
},
},