Extent
Represents a geographic region defined by two extreme locations (North West and South East).
Name | Type | Default | Description |
---|---|---|---|
nw |
|
The North West extreme location. | |
se |
|
The South East extreme location. |
Constructors
Extent
(nw: Location | number[] | [number, number], se: Location | number[] | [number, number])
Creates a new Extent.
Parameters
nw
Location | number[] | [number, number]
The North West extreme location.
se
Location | number[] | [number, number]
The South East extreme location.
Methods
center | ||||
---|---|---|---|---|
Returns the center of the extent. | ||||
|
contains | ||||||
---|---|---|---|---|---|---|
Tests if a location is contained within the extent. | ||||||
| ||||||
|
containsAny | ||||||
---|---|---|---|---|---|---|
Tests if any of the locations is contained within the extent. | ||||||
| ||||||
|
edges | ||||
---|---|---|---|---|
Returns the four extreme locations of the extent. | ||||
|
include | ||||||
---|---|---|---|---|---|---|
Grows the extent, if required, to contain the specified location. | ||||||
|
includeAll | ||||||
---|---|---|---|---|---|---|
Grows the extent, if required, to contain all specified locations. | ||||||
|
overlaps | ||||||
---|---|---|---|---|---|---|
Tests if the given extent overlaps with this instance. | ||||||
| ||||||
|
toArray | ||||
---|---|---|---|---|
Returns the four extreme locations of the extent as an array. | ||||
|