Created
August 1, 2012 19:19
-
-
Save stdavis/3229906 to your computer and use it in GitHub Desktop.
geocoding web service example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| _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