require(["esri/geometry/Extent"], function(Extent) { /* code goes here */ });
Class: esri/geometry/Extent
Inheritance: Extent Geometry Accessor
Since: ArcGIS API for JavaScript 4.0

The minimum and maximum X and Y coordinates of a bounding box. Extent is used to describe the visible portion of a MapView. When working in a SceneView, Camera is used to define the visible part of the map within the view.

See also:

Constructors

new Extent(properties)

Parameter:
properties Object
optional

See the properties for a list of all the properties that may be passed into the constructor.

Property Overview

Any properties can be set, retrieved or listened to. See the Working with Properties topic.
NameTypeSummary
Object

The cache is used to store values computed from geometries that need to cleared or recomputed upon mutation.

more details
more details
Point

The center point of the extent in map units.

more details
more details
String

The name of the class.

more details
more details
Extent

The extent of the geometry.

more details
more details
Boolean

Indicates if the geometry has M values.

more details
more details
Boolean

Indicates if the geometry has Z (elevation) values.

more details
more details
Number

The height of the extent in map units (the distance between ymin and ymax).

more details
more details
Number

The maximum possible m value in an extent envelope.

more details
more details
Number

The minimum possible m value of an extent envelope.

more details
more details
SpatialReference

The spatial reference of the geometry.

more details
more details
String

For Extent, the type is always extent.

more details
more details
Number

The width of the extent in map units (the distance between xmin and xmax).

more details
more details
Number

The bottom-right X-coordinate of an extent envelope.

more details
more details
Number

The top-left X-coordinate of an extent envelope.

more details
more details
Number

The top-right Y-coordinate of an extent envelope.

more details
more details
Number

The bottom-left Y-coordinate of an extent envelope.

more details
more details
Number

The maximum possible z, or elevation, value in an extent envelope.

more details
more details
Number

The minimum possible z, or elevation, value of an extent envelope.

more details
more details

Property Details

cacheObjectreadonly

The cache is used to store values computed from geometries that need to cleared or recomputed upon mutation. An example is the extent of a polygon. The default value is null.

centerPoint

The center point of the extent in map units.

declaredClassStringreadonly

The name of the class. The declared class name is formatted as esri.folder.className.

extentExtentreadonly

The extent of the geometry. For points, the extent is null.

Indicates if the geometry has M values.

Indicates if the geometry has Z (elevation) values.

Z-values defined in a geographic or metric coordinate system are expressed in meters. However, in local scenes that use a projected coordinate system, vertical units are assumed to be the same as the horizontal units specified by the service.

heightNumber

The height of the extent in map units (the distance between ymin and ymax).

mmaxNumber

The maximum possible m value in an extent envelope.

Default Value: undefined

mminNumber

The minimum possible m value of an extent envelope.

Default Value: undefined

spatialReferenceSpatialReference autocast

The spatial reference of the geometry.

Default Value: WGS84 (wkid: 4326)

typeStringreadonly

For Extent, the type is always extent.

widthNumber

The width of the extent in map units (the distance between xmin and xmax).

xmaxNumber

The bottom-right X-coordinate of an extent envelope.

Default Value: 0

xminNumber

The top-left X-coordinate of an extent envelope.

Default Value: 0

ymaxNumber

The top-right Y-coordinate of an extent envelope.

Default Value: 0

yminNumber

The bottom-left Y-coordinate of an extent envelope.

Default Value: 0

zmaxNumber

The maximum possible z, or elevation, value in an extent envelope.

Z-values defined in a geographic or metric coordinate system are expressed in meters. However, in local scenes that use a projected coordinate system, vertical units are assumed to be the same as the horizontal units specified by the service.

Default Value: undefined

zminNumber

The minimum possible z, or elevation, value of an extent envelope.

Z-values defined in a geographic or metric coordinate system are expressed in meters. However, in local scenes that use a projected coordinate system, vertical units are assumed to be the same as the horizontal units specified by the service.

Default Value: undefined

Method Overview

NameReturn TypeSummary
Extent

Centers the extent to the specified Point.

more details
more details
Extent

Creates a deep clone of Extent object.

more details
more details
Boolean

Checks if the input geometry is contained within the extent.

more details
more details
Boolean

Indicates if the input extent is equal to the testing extent.

more details
more details
Extent

Expands the extent by the given factor.

more details
more details
*

Creates a new instance of this class and initializes it with values from a JSON object generated from a product in the ArcGIS platform.

more details
more details
Extent

Shrinks the original extent to the intersection with the input extent.

more details
more details
Boolean

Tests to validate if the input geometry intersects the extent and returns a Boolean value.

more details
more details
Extent[]

Returns an array with either one Extent that's been shifted to within +/- 180 or two Extents if the original extent intersects the International Dateline.

more details
more details
Extent

Modifies the extent geometry in-place with X and Y offsets in map units.

more details
more details
Object

Converts an instance of this class to its ArcGIS Portal JSON representation.

more details
more details
Extent

Expands the original extent to include the extent of the input Extent.

more details
more details

Method Details

centerAt(point){Extent}

Centers the extent to the specified Point. This method modifies the extent geometry in-place. You should clone the extent object before calling this method where appropriate.

Parameter:
point Point

The point to center the extent.

Returns:
TypeDescription
ExtentThe new extent with point as the center.

clone(){Extent}

Creates a deep clone of Extent object.

Returns:
TypeDescription
ExtentA new instance of a Extent object equal to the object used to call .clone().

contains(geometry){Boolean}

Checks if the input geometry is contained within the extent.

Parameter:
geometry Point | Extent

Input geometry to test if it is contained within the extent.

Returns:
TypeDescription
BooleanReturns true if the input geometry is contained within the extent.

equals(extent){Boolean}

Indicates if the input extent is equal to the testing extent.

Parameter:
extent Extent

Input extent.

Returns:
TypeDescription
BooleanReturns true if the input extent is equal to the extent that calls equals().

expand(factor){Extent}

Expands the extent by the given factor. For example, a value of 1.5 will expand the extent to be 50 percent larger than the original extent. This method modifies the extent geometry in-place. You should clone the extent object before calling this method where appropriate.

Parameter:
factor Number

The multiplier value.

Returns:
TypeDescription
ExtentReturns the expanded extent.

fromJSON(json){*}static

Creates a new instance of this class and initializes it with values from a JSON object generated from a product in the ArcGIS platform. The object passed into the input json parameter often comes from a response to a query operation in the REST API or a toJSON() method from another ArcGIS product. See the Using fromJSON() topic in the Guide for details and examples of when and how to use this function.

Parameter:
json Object

A JSON representation of the instance in the ArcGIS format. See the ArcGIS REST API documentation for examples of the structure of various input JSON objects.

Returns:
TypeDescription
*Returns a new instance of this class.

intersection(extent){Extent}

Shrinks the original extent to the intersection with the input extent. This method modifies the extent geometry in-place. You should clone the extent object before calling this method where appropriate. If the original extent and the input extent have no intersection, the extent is not modified and null is returned.

Parameter:
extent Extent

The input extent to intersect.

Returns:
TypeDescription
ExtentThe intersection of the input Extent with the original Extent or null.

intersects(geometry){Boolean}

Tests to validate if the input geometry intersects the extent and returns a Boolean value.

Parameter:
geometry Geometry

The geometry used to test the intersection. It can be a Point, Polyline, Polygon, Extent or Multipoint.

Returns:
TypeDescription
BooleanReturns true, if the input geometry intersects the extent.

normalize(){Extent[]}

Returns an array with either one Extent that's been shifted to within +/- 180 or two Extents if the original extent intersects the International Dateline.

This method modifies the extent geometry in-place. You should clone the extent object before calling this method where appropriate.

Returns:
TypeDescription
Extent[]The normalized Extent(s).

offset(dx, dy, dz){Extent}

Modifies the extent geometry in-place with X and Y offsets in map units. You should clone the extent object before calling this method where appropriate.

Parameters:

The offset distance in map units for the X-coordinate.

The offset distance in map units for the Y-coordinate.

The offset distance in map units for the Z-coordinate.

Returns:
TypeDescription
ExtentThe offset Extent.

toJSON(){Object}inherited

Converts an instance of this class to its ArcGIS Portal JSON representation. See the Using fromJSON() topic in the Guide for more information.

Returns:
TypeDescription
ObjectThe ArcGIS Portal JSON representation of an instance of this class.

union(extent){Extent}

Expands the original extent to include the extent of the input Extent. This method modifies the extent geometry in-place. You should clone the extent object before calling this method where appropriate.

Parameter:
extent Extent

The input extent to union.

Returns:
TypeDescription
ExtentThe union of the input Extent with the original Extent.

API Reference search results

NameTypeModule

There were no match results from your search criteria.