()
| 448 | } |
| 449 | |
| 450 | getExtent() { |
| 451 | if (!this._rectifyExtent) { |
| 452 | const width = this.extent[2] - this.extent[0]; |
| 453 | const height = this.extent[3] - this.extent[1]; |
| 454 | if (width === height) { |
| 455 | this._rectifyExtent = [this.extent[0], this.extent[1], this.extent[2], this.extent[3]]; |
| 456 | } else { |
| 457 | const a = Math.max(width, height); |
| 458 | this._rectifyExtent = [this.extent[0], this.extent[3] - a, this.extent[0] + a, this.extent[3]]; |
| 459 | } |
| 460 | } |
| 461 | return this._rectifyExtent; |
| 462 | } |
| 463 | |
| 464 | getEpsgCode() { |
| 465 | return this.epsgCode; |
no test coverage detected