Methods
-
Apply a transform function to the extent.
Name Type Description extent
ol.Extent Extent.
transformFn
ol.TransformFunction Transform function. Called with [minX, minY, maxX, maxY] extent coordinates.
extent
ol.Extent Destination extent.
Returns:
Extent.
-
Build an extent that includes all given coordinates.
Name Type Description coordinates
Array.<ol.Coordinate> Coordinates.
Returns:
Bounding extent.
-
Return extent increased by the provided value.
Name Type Description extent
ol.Extent Extent.
value
number The amount by which the extent should be buffered.
extent
ol.Extent Extent.
Returns:
Extent.
-
ol.extent.containsCoordinate(extent, coordinate){boolean}
src/ol/extent.js, line 120 -
Check if the passed coordinate is contained or on the edge of the extent.
Name Type Description extent
ol.Extent Extent.
coordinate
ol.Coordinate Coordinate.
Returns:
The coordinate is contained in the extent.
-
ol.extent.containsExtent(extent1, extent2){boolean}
src/ol/extent.js, line 137 -
Check if one extent contains another.
An extent is deemed contained if it lies completely within the other extent, including if they share one or more edges.
Name Type Description extent1
ol.Extent Extent 1.
extent2
ol.Extent Extent 2.
Returns:
The second extent is contained by or on the edge of the first.
-
ol.extent.containsXY(extent, x, y){boolean}
src/ol/extent.js, line 152 -
Check if the passed coordinate is contained or on the edge of the extent.
Name Type Description extent
ol.Extent Extent.
x
number X coordinate.
y
number Y coordinate.
Returns:
The x, y values are contained in the extent.
-
Create an empty extent.
Returns:
Empty extent.
-
ol.extent.equals(extent1, extent2){boolean}
src/ol/extent.js, line 288 -
Determine if two extents are equivalent.
Name Type Description extent1
ol.Extent Extent 1.
extent2
ol.Extent Extent 2.
Returns:
The two extents are equivalent.
-
Modify an extent to include another extent.
Name Type Description extent1
ol.Extent The extent to be modified.
extent2
ol.Extent The extent that will be included in the first.
Returns:
A reference to the first (extended) extent.
-
ol.extent.getArea(extent){number}
src/ol/extent.js, line 434 -
Get the size of an extent.
Name Type Description extent
ol.Extent Extent.
Returns:
Area.
-
Get the bottom left coordinate of an extent.
Name Type Description extent
ol.Extent Extent.
Returns:
Bottom left coordinate.
-
Get the bottom right coordinate of an extent.
Name Type Description extent
ol.Extent Extent.
Returns:
Bottom right coordinate.
-
Get the center coordinate of an extent.
Name Type Description extent
ol.Extent Extent.
Returns:
Center.
-
ol.extent.getHeight(extent){number}
src/ol/extent.js, line 553 -
Get the height of an extent.
Name Type Description extent
ol.Extent Extent.
Returns:
Height.
-
Get the intersection of two extents.
Name Type Description extent1
ol.Extent Extent 1.
extent2
ol.Extent Extent 2.
extent
ol.Extent Optional extent to populate with intersection.
Returns:
Intersecting extent.
-
Get the size (width, height) of an extent.
Name Type Description extent
ol.Extent The extent.
Returns:
The extent size.
-
Get the top left coordinate of an extent.
Name Type Description extent
ol.Extent Extent.
Returns:
Top left coordinate.
-
Get the top right coordinate of an extent.
Name Type Description extent
ol.Extent Extent.
Returns:
Top right coordinate.
-
ol.extent.getWidth(extent){number}
src/ol/extent.js, line 653 -
Get the width of an extent.
Name Type Description extent
ol.Extent Extent.
Returns:
Width.
-
ol.extent.intersects(extent1, extent2){boolean}
src/ol/extent.js, line 665 -
Determine if one extent intersects another.
Name Type Description extent1
ol.Extent Extent 1.
extent2
ol.Extent Extent.
Returns:
The two extents intersect.
-
ol.extent.isEmpty(extent){boolean}
src/ol/extent.js, line 679 -
Determine if an extent is empty.
Name Type Description extent
ol.Extent Extent.
Returns:
Is empty.