Process queue immediately when params change
This fixes an issue where the queue would never be processed when a layer is updated using mergeNewParams.
This commit is contained in:
@@ -114,6 +114,7 @@ OpenLayers.TileManager = OpenLayers.Class({
|
|||||||
map.events.on({
|
map.events.on({
|
||||||
move: this.move,
|
move: this.move,
|
||||||
zoomend: this.zoomEnd,
|
zoomend: this.zoomEnd,
|
||||||
|
changelayer: this.changeLayer,
|
||||||
addlayer: this.addLayer,
|
addlayer: this.addLayer,
|
||||||
preremovelayer: this.removeLayer,
|
preremovelayer: this.removeLayer,
|
||||||
scope: this
|
scope: this
|
||||||
@@ -141,6 +142,7 @@ OpenLayers.TileManager = OpenLayers.Class({
|
|||||||
map.events.un({
|
map.events.un({
|
||||||
move: this.move,
|
move: this.move,
|
||||||
zoomend: this.zoomEnd,
|
zoomend: this.zoomEnd,
|
||||||
|
changelayer: this.changeLayer,
|
||||||
addlayer: this.addLayer,
|
addlayer: this.addLayer,
|
||||||
preremovelayer: this.removeLayer,
|
preremovelayer: this.removeLayer,
|
||||||
scope: this
|
scope: this
|
||||||
@@ -173,6 +175,19 @@ OpenLayers.TileManager = OpenLayers.Class({
|
|||||||
this.updateTimeout(evt.object, this.zoomDelay);
|
this.updateTimeout(evt.object, this.zoomDelay);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Method: changeLayer
|
||||||
|
* Handles the map's changeLayer event
|
||||||
|
*
|
||||||
|
* Parameters:
|
||||||
|
* evt - {Object} Listener argument
|
||||||
|
*/
|
||||||
|
changeLayer: function(evt) {
|
||||||
|
if (evt.property === 'params') {
|
||||||
|
this.updateTimeout(evt.object, 0);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Method: addLayer
|
* Method: addLayer
|
||||||
* Handles the map's addlayer event
|
* Handles the map's addlayer event
|
||||||
|
|||||||
Reference in New Issue
Block a user