Skip to content

Instantly share code, notes, and snippets.

@stdavis
Created August 1, 2012 19:19
Show Gist options
  • Select an option

  • Save stdavis/3229906 to your computer and use it in GitHub Desktop.

Select an option

Save stdavis/3229906 to your computer and use it in GitHub Desktop.
geocoding web service example
_invokeWebService: function (args) {
// summary:
// calls the web service
// description:
// sends the request to the wsut webservice
// tags:
// private
// returns:
// Deferred
console.info(this.declaredClass + "::" + arguments.callee.nom);
var args = {
address: '123 main st',
zone: '84117'
};
var params = {
callbackParamName: "callback",
url: "//mapserv.utah.gov/wsut/Geocode.svc/sgid45/street(" + args.address + ")zone(" + args.zone + ")",
handleAs: "json",
timeout: this._timeout,
preventCache: true
};
var def = dojo.io.script.get(params);
dojo.when(def, onGeocodesuccess, onGeocodeerror);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment