Commit a 'changeParams' method, along with test and example, to show how it would be possible to use WMS-T with changeParams. ChangeParams sets the new params, then recalls initTiles with the new params set.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@843 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -309,6 +309,16 @@ OpenLayers.Layer.Grid.prototype = Object.extend( new OpenLayers.Layer(), {
|
||||
addTile:function(bounds,position) {
|
||||
// Should be implemented by subclasses
|
||||
},
|
||||
|
||||
/**
|
||||
* changeParams is designed to allow you to change the
|
||||
* parameters of a layer after it's created.
|
||||
* @param {Object} params Hash of new params to use
|
||||
*/
|
||||
changeParams:function(params) {
|
||||
this.params = Object.extend(this.params, OpenLayers.Util.upperCaseObject(params));
|
||||
this._initTiles();
|
||||
},
|
||||
|
||||
/**
|
||||
* @returns Degrees per Pixel
|
||||
|
||||
@@ -92,6 +92,17 @@ OpenLayers.Layer.WMS.Untiled.prototype =
|
||||
tile.draw();
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* changeParams is designed to allow you to change the
|
||||
* parameters of a layer after it's created.
|
||||
* @param {Object} params Hash of new params to use
|
||||
*/
|
||||
changeParams:function(params) {
|
||||
this.params = Object.extend(this.params, OpenLayers.Util.upperCaseObject(params));
|
||||
this._initTiles();
|
||||
},
|
||||
|
||||
/** @final @type String */
|
||||
CLASS_NAME: "OpenLayers.Layer.WMS.Untiled"
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user