Using the extent provided to the image layer constructor as the default maxExtent. To set a custom maxExtent (as always), use the maxExtent property of the options argument. r=me (closes #1867)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@8613 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -30,7 +30,10 @@ OpenLayers.Layer.Image = OpenLayers.Class(OpenLayers.Layer, {
|
||||
|
||||
/**
|
||||
* Property: extent
|
||||
* {<OpenLayers.Bounds>} The image bounds in map units
|
||||
* {<OpenLayers.Bounds>} The image bounds in map units. This extent will
|
||||
* also be used as the default maxExtent for the layer. If you wish
|
||||
* to have a maxExtent that is different than the image extent, set the
|
||||
* maxExtent property of the options argument (as with any other layer).
|
||||
*/
|
||||
extent: null,
|
||||
|
||||
@@ -67,6 +70,7 @@ OpenLayers.Layer.Image = OpenLayers.Class(OpenLayers.Layer, {
|
||||
initialize: function(name, url, extent, size, options) {
|
||||
this.url = url;
|
||||
this.extent = extent;
|
||||
this.maxExtent = extent;
|
||||
this.size = size;
|
||||
OpenLayers.Layer.prototype.initialize.apply(this, [name, options]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user