Check for map first. No functional change, but fixes tests and does not hurt (see #3521)
This commit is contained in:
1 parent
dd48ea3cbc
commit
cca0bf5e38
1 file changed
+1
-1
@@ -213,7 +213,7 @@ OpenLayers.Tile = OpenLayers.Class({
|
||||
*/
|
||||
setBounds: function(bounds) {
|
||||
bounds = bounds.clone();
|
||||
if (this.layer.map.baseLayer.wrapDateLine) {
|
||||
if (this.layer.map && this.layer.map.baseLayer.wrapDateLine) {
|
||||
var worldExtent = this.layer.map.getMaxExtent();
|
||||
bounds = bounds.wrapDateLine(worldExtent);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user