Methods
-
module:ol/extent.applyTransform(extent, transformFn, opt_extent, opt_stops){module:ol/extent~Extent}
extent.js, line 798 -
import {applyTransform} from 'ol/extent';Apply a transform function to the extent.
Name Type Description extentmodule:ol/extent~Extent Extent.
transformFnmodule:ol/proj~TransformFunction Transform function. Called with
[minX, minY, maxX, maxY]extent coordinates.extentmodule:ol/extent~Extent Destination extent.
stopsnumber Number of stops per side used for the transform. By default only the corners are used.
Returns:
Extent.
-
import {boundingExtent} from 'ol/extent';Build an extent that includes all given coordinates.
Name Type Description coordinatesArray.<module:ol/coordinate~Coordinate> Coordinates.
Returns:
Bounding extent.
-
import {buffer} from 'ol/extent';Return extent increased by the provided value.
Name Type Description extentmodule:ol/extent~Extent Extent.
valuenumber The amount by which the extent should be buffered.
extentmodule:ol/extent~Extent Extent.
Returns:
Extent.
-
module:ol/extent.containsCoordinate(extent, coordinate){boolean}
extent.js, line 127 -
import {containsCoordinate} from 'ol/extent';Check if the passed coordinate is contained or on the edge of the extent.
Name Type Description extentmodule:ol/extent~Extent Extent.
coordinatemodule:ol/coordinate~Coordinate Coordinate.
Returns:
The coordinate is contained in the extent.
-
module:ol/extent.containsExtent(extent1, extent2){boolean}
extent.js, line 144 -
import {containsExtent} from 'ol/extent';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 extent1module:ol/extent~Extent Extent 1.
extent2module:ol/extent~Extent Extent 2.
Returns:
The second extent is contained by or on the edge of the first.
-
module:ol/extent.containsXY(extent, x, y){boolean}
extent.js, line 159 -
import {containsXY} from 'ol/extent';Check if the passed coordinate is contained or on the edge of the extent.
Name Type Description extentmodule:ol/extent~Extent Extent.
xnumber X coordinate.
ynumber Y coordinate.
Returns:
The x, y values are contained in the extent.
-
import {createEmpty} from 'ol/extent';Create an empty extent.
Returns:
Empty extent.
-
module:ol/extent.equals(extent1, extent2){boolean}
extent.js, line 293 -
import {equals} from 'ol/extent';Determine if two extents are equivalent.
Name Type Description extent1module:ol/extent~Extent Extent 1.
extent2module:ol/extent~Extent Extent 2.
Returns:
The two extents are equivalent.
-
import {extend} from 'ol/extent';Modify an extent to include another extent.
Name Type Description extent1module:ol/extent~Extent The extent to be modified.
extent2module:ol/extent~Extent The extent that will be included in the first.
Returns:
A reference to the first (extended) extent.
-
module:ol/extent.getArea(extent){number}
extent.js, line 447 -
import {getArea} from 'ol/extent';Get the size of an extent.
Name Type Description extentmodule:ol/extent~Extent Extent.
Returns:
Area.
-
import {getBottomLeft} from 'ol/extent';Get the bottom left coordinate of an extent.
Name Type Description extentmodule:ol/extent~Extent Extent.
Returns:
Bottom left coordinate.
-
import {getBottomRight} from 'ol/extent';Get the bottom right coordinate of an extent.
Name Type Description extentmodule:ol/extent~Extent Extent.
Returns:
Bottom right coordinate.
-
import {getCenter} from 'ol/extent';Get the center coordinate of an extent.
Name Type Description extentmodule:ol/extent~Extent Extent.
Returns:
Center.
-
module:ol/extent.getHeight(extent){number}
extent.js, line 566 -
import {getHeight} from 'ol/extent';Get the height of an extent.
Name Type Description extentmodule:ol/extent~Extent Extent.
Returns:
Height.
-
module:ol/extent.getIntersection(extent1, extent2, opt_extent){module:ol/extent~Extent}
extent.js, line 590 -
import {getIntersection} from 'ol/extent';Get the intersection of two extents.
Name Type Description extent1module:ol/extent~Extent Extent 1.
extent2module:ol/extent~Extent Extent 2.
extentmodule:ol/extent~Extent Optional extent to populate with intersection.
Returns:
Intersecting extent.
-
import {getSize} from 'ol/extent';Get the size (width, height) of an extent.
Name Type Description extentmodule:ol/extent~Extent The extent.
Returns:
The extent size.
-
import {getTopLeft} from 'ol/extent';Get the top left coordinate of an extent.
Name Type Description extentmodule:ol/extent~Extent Extent.
Returns:
Top left coordinate.
-
import {getTopRight} from 'ol/extent';Get the top right coordinate of an extent.
Name Type Description extentmodule:ol/extent~Extent Extent.
Returns:
Top right coordinate.
-
module:ol/extent.getWidth(extent){number}
extent.js, line 668 -
import {getWidth} from 'ol/extent';Get the width of an extent.
Name Type Description extentmodule:ol/extent~Extent Extent.
Returns:
Width.
-
module:ol/extent.intersects(extent1, extent2){boolean}
extent.js, line 680 -
import {intersects} from 'ol/extent';Determine if one extent intersects another.
Name Type Description extent1module:ol/extent~Extent Extent 1.
extent2module:ol/extent~Extent Extent.
Returns:
The two extents intersect.
-
module:ol/extent.isEmpty(extent){boolean}
extent.js, line 694 -
import {isEmpty} from 'ol/extent';Determine if an extent is empty.
Name Type Description extentmodule:ol/extent~Extent Extent.
Returns:
Is empty.
Type Definitions
-
Extent{Array.<number>}
-
An array of numbers representing an extent:
[minx, miny, maxx, maxy].
OpenLayers