| 185 | | var res = this.getResolution(); |
|---|
| 186 | | var size = this.getSize(); |
|---|
| 187 | | var w_deg = size.w * res; |
|---|
| 188 | | var h_deg = size.h * res; |
|---|
| 189 | | return new OpenLayers.Bounds( |
|---|
| 190 | | this.center.lon - w_deg / 2, |
|---|
| 191 | | this.center.lat - h_deg / 2, |
|---|
| 192 | | this.center.lon + w_deg / 2, |
|---|
| 193 | | this.center.lat + h_deg / 2); |
|---|
| | 185 | if (this.center) { |
|---|
| | 186 | var res = this.getResolution(); |
|---|
| | 187 | var size = this.getSize(); |
|---|
| | 188 | var w_deg = size.w * res; |
|---|
| | 189 | var h_deg = size.h * res; |
|---|
| | 190 | return new OpenLayers.Bounds( |
|---|
| | 191 | this.center.lon - w_deg / 2, |
|---|
| | 192 | this.center.lat - h_deg / 2, |
|---|
| | 193 | this.center.lon + w_deg / 2, |
|---|
| | 194 | this.center.lat + h_deg / 2); |
|---|
| | 195 | } else { |
|---|
| | 196 | return null; |
|---|
| | 197 | } |
|---|