Merge pull request #184 from fredj/get-url-async
Change getUrlAsync parameters. r=ahocevar
This commit is contained in:
@@ -205,12 +205,10 @@ OpenLayers.Layer.ArcIMS = OpenLayers.Class(OpenLayers.Layer.Grid, {
|
||||
* Parameters:
|
||||
* bounds - {<OpenLayers.Bounds>} A bounds representing the bbox for the
|
||||
* request.
|
||||
* scope - {Object} The scope of the callback method.
|
||||
* prop - {String} The name of the property in the scoped object to
|
||||
* recieve the image url.
|
||||
* callback - {Function} Function to call when image url is retrieved.
|
||||
* scope - {Object} The scope of the callback method.
|
||||
*/
|
||||
getURLasync: function(bounds, scope, prop, callback) {
|
||||
getURLasync: function(bounds, callback, scope) {
|
||||
bounds = this.adjustBounds(bounds);
|
||||
|
||||
// create an arcxml request to generate the image
|
||||
@@ -239,11 +237,7 @@ OpenLayers.Layer.ArcIMS = OpenLayers.Class(OpenLayers.Layer.Grid, {
|
||||
var axlResp = new OpenLayers.Format.ArcXML();
|
||||
var arcxml = axlResp.read(doc);
|
||||
|
||||
scope[prop] = this.getUrlOrImage(arcxml.image.output);
|
||||
|
||||
// call the callback function to recieve the updated property on the
|
||||
// scoped object
|
||||
callback.apply(scope);
|
||||
callback.call(scope, this.getUrlOrImage(arcxml.image.output));
|
||||
},
|
||||
scope: this
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user