Change getUrlAsync parameters.
Instead of giving the function a bound, a scope, a property to update and a callback, only give the bound and a callback. When the url is retrieved by getUrlAsync, simply call the callback with the url as argument and let the caller manage this.
This commit is contained in:
@@ -85,9 +85,8 @@
|
||||
var layer = new OpenLayers.Layer.WMS(
|
||||
"Name",
|
||||
"http://labs.metacarta.com/TESTURL?",
|
||||
{layers: 'basic'}, {async: true, getURLasync: function(bounds, scope, url, callback) {
|
||||
scope.url = this.getURL(bounds);
|
||||
callback.call(scope);
|
||||
{layers: 'basic'}, {async: true, getURLasync: function(bounds, callback) {
|
||||
callback(this.getURL(bounds));
|
||||
}}
|
||||
);
|
||||
map.addLayer(layer);
|
||||
|
||||
Reference in New Issue
Block a user