New OpenLayers.Layer.Grid.tileClass option. Defaults to OpenLayers.Tile.Image
This commit is contained in:
@@ -50,6 +50,13 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, {
|
||||
* created by this Layer, if supported by the tile class.
|
||||
*/
|
||||
tileOptions: null,
|
||||
|
||||
/**
|
||||
* APIProperty: tileClass
|
||||
* {<OpenLayers.Tile>} The tile class to use for this layer.
|
||||
* Defaults is OpenLayers.Tile.Image.
|
||||
*/
|
||||
tileClass: OpenLayers.Tile.Image,
|
||||
|
||||
/**
|
||||
* Property: grid
|
||||
@@ -900,9 +907,9 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, {
|
||||
* Returns:
|
||||
* {<OpenLayers.Tile>} The added OpenLayers.Tile
|
||||
*/
|
||||
addTile:function(bounds, position) {
|
||||
return new OpenLayers.Tile.Image(this, position, bounds, null,
|
||||
this.tileSize, this.tileOptions);
|
||||
addTile: function(bounds, position) {
|
||||
return new this.tileClass(this, position, bounds, null,
|
||||
this.tileSize, this.tileOptions);
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user