ability to switch between singleTile true and false
This commit is contained in:
@@ -394,6 +394,30 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* APIMethod: addOptions
|
||||||
|
*
|
||||||
|
* Parameters:
|
||||||
|
* newOptions - {Object}
|
||||||
|
* reinitialize - {Boolean} If set to true, and if resolution options of the
|
||||||
|
* current baseLayer were changed, the map will be recentered to make
|
||||||
|
* sure that it is displayed with a valid resolution, and a
|
||||||
|
* changebaselayer event will be triggered.
|
||||||
|
*/
|
||||||
|
addOptions: function (newOptions, reinitialize) {
|
||||||
|
OpenLayers.Layer.HTTPRequest.prototype.addOptions.apply(this, arguments);
|
||||||
|
if (newOptions.singleTile !== undefined) {
|
||||||
|
this.clearGrid();
|
||||||
|
if (newOptions.singleTile === true) {
|
||||||
|
this.setTileSize();
|
||||||
|
this.initSingleTile(this.map.getExtent());
|
||||||
|
} else {
|
||||||
|
this.tileSize = this.options.tileSize || this.map.getTileSize();
|
||||||
|
this.initGriddedTiles(this.map.getExtent());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* APIMethod: clone
|
* APIMethod: clone
|
||||||
* Create a clone of this layer
|
* Create a clone of this layer
|
||||||
|
|||||||
Reference in New Issue
Block a user