Module: ol/extent

ol/extent


Methods

module:ol/extent.applyTransform(extent, transformFn, opt_extent){module:ol/extent~Extent}

extent.js, line 785

Apply a transform function to the extent.

Name Type Description
extent module:ol/extent~Extent

Extent.

transformFn module:ol/proj~TransformFunction

Transform function. Called with [minX, minY, maxX, maxY] extent coordinates.

extent module:ol/extent~Extent

Destination extent.

Returns:
Extent.

module:ol/extent.boundingExtent(coordinates){module:ol/extent~Extent}

extent.js, line 22

Build an extent that includes all given coordinates.

Name Type Description
coordinates Array.<module:ol/coordinate~Coordinate>

Coordinates.

Returns:
Bounding extent.

module:ol/extent.buffer(extent, value, opt_extent){module:ol/extent~Extent}

extent.js, line 55

Return extent increased by the provided value.

Name Type Description
extent module:ol/extent~Extent

Extent.

value number

The amount by which the extent should be buffered.

extent module:ol/extent~Extent

Extent.

Returns:
Extent.

module:ol/extent.containsCoordinate(extent, coordinate){boolean}

extent.js, line 127

Check if the passed coordinate is contained or on the edge of the extent.

Name Type Description
extent module:ol/extent~Extent

Extent.

coordinate module:ol/coordinate~Coordinate

Coordinate.

Returns:
The coordinate is contained in the extent.

module:ol/extent.containsExtent(extent1, extent2){boolean}

extent.js, line 144

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 module:ol/extent~Extent

Extent 1.

extent2 module: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

Check if the passed coordinate is contained or on the edge of the extent.

Name Type Description
extent module:ol/extent~Extent

Extent.

x number

X coordinate.

y number

Y coordinate.

Returns:
The x, y values are contained in the extent.

module:ol/extent.createEmpty(){module:ol/extent~Extent}

extent.js, line 201

Create an empty extent.

Returns:
Empty extent.

module:ol/extent.equals(extent1, extent2){boolean}

extent.js, line 293

Determine if two extents are equivalent.

Name Type Description
extent1 module:ol/extent~Extent

Extent 1.

extent2 module:ol/extent~Extent

Extent 2.

Returns:
The two extents are equivalent.

module:ol/extent.extend(extent1, extent2){module:ol/extent~Extent}

extent.js, line 306

Modify an extent to include another extent.

Name Type Description
extent1 module:ol/extent~Extent

The extent to be modified.

extent2 module: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 436

Get the size of an extent.

Name Type Description
extent module:ol/extent~Extent

Extent.

Returns:
Area.

module:ol/extent.getBottomLeft(extent){module:ol/coordinate~Coordinate}

extent.js, line 451

Get the bottom left coordinate of an extent.

Name Type Description
extent module:ol/extent~Extent

Extent.

Returns:
Bottom left coordinate.

module:ol/extent.getBottomRight(extent){module:ol/coordinate~Coordinate}

extent.js, line 462

Get the bottom right coordinate of an extent.

Name Type Description
extent module:ol/extent~Extent

Extent.

Returns:
Bottom right coordinate.

module:ol/extent.getCenter(extent){module:ol/coordinate~Coordinate}

extent.js, line 473

Get the center coordinate of an extent.

Name Type Description
extent module:ol/extent~Extent

Extent.

Returns:
Center.

module:ol/extent.getHeight(extent){number}

extent.js, line 555

Get the height of an extent.

Name Type Description
extent module:ol/extent~Extent

Extent.

Returns:
Height.

module:ol/extent.getIntersection(extent1, extent2, opt_extent){module:ol/extent~Extent}

extent.js, line 579

Get the intersection of two extents.

Name Type Description
extent1 module:ol/extent~Extent

Extent 1.

extent2 module:ol/extent~Extent

Extent 2.

extent module:ol/extent~Extent

Optional extent to populate with intersection.

Returns:
Intersecting extent.

module:ol/extent.getSize(extent){module:ol/size~Size}

extent.js, line 624

Get the size (width, height) of an extent.

Name Type Description
extent module:ol/extent~Extent

The extent.

Returns:
The extent size.

module:ol/extent.getTopLeft(extent){module:ol/coordinate~Coordinate}

extent.js, line 635

Get the top left coordinate of an extent.

Name Type Description
extent module:ol/extent~Extent

Extent.

Returns:
Top left coordinate.

module:ol/extent.getTopRight(extent){module:ol/coordinate~Coordinate}

extent.js, line 646

Get the top right coordinate of an extent.

Name Type Description
extent module:ol/extent~Extent

Extent.

Returns:
Top right coordinate.

module:ol/extent.getWidth(extent){number}

extent.js, line 657

Get the width of an extent.

Name Type Description
extent module:ol/extent~Extent

Extent.

Returns:
Width.

module:ol/extent.intersects(extent1, extent2){boolean}

extent.js, line 669

Determine if one extent intersects another.

Name Type Description
extent1 module:ol/extent~Extent

Extent 1.

extent2 module:ol/extent~Extent

Extent.

Returns:
The two extents intersect.

module:ol/extent.isEmpty(extent){boolean}

extent.js, line 683

Determine if an extent is empty.

Name Type Description
extent module:ol/extent~Extent

Extent.

Returns:
Is empty.

Type Definitions

Extent{Array.<number>}

An array of numbers representing an extent: [minx, miny, maxx, maxy].