ability to switch between singleTile true and false
This commit is contained in:
@@ -393,6 +393,30 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, {
|
||||
this.gridLayout = null;
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 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
|
||||
|
||||
Reference in New Issue
Block a user