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:
fredj
2012-01-27 13:23:08 +01:00
parent 9aa1c4450e
commit fe202cef14
3 changed files with 10 additions and 19 deletions

View File

@@ -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);