| Package | com.esri.ags.geometry |
| Class | public class Extent |
| Inheritance | Extent Geometry |
<esri:Map>
<esri:extent>
<esri:Extent xmin="15" ymin="54" xmax="40" ymax="71">
<esri:SpatialReference wkid="4326"/>
</esri:Extent>
</esri:extent>
</esri:Map>
<esri:Extent id="myExtent" xmin="15" ymin="54" xmax="40" ymax="71" spatialReference="{new SpatialReference(4326)}"/>
<esri:Map extent="{myExtent}"/>See also
| Property | Defined by | ||
|---|---|---|---|
| center : MapPoint
[read-only]
Returns the centerpoint of the extent.
| Extent | ||
| extent : Extent
[read-only]
The extent of this Extent.
| Extent | ||
| height : Number [read-only]
Distance between ymin and ymax.
| Extent | ||
![]() | spatialReference : SpatialReference
The spatial reference of the geometry.
| Geometry | |
| type : String [read-only]
The type of geometry is EXTENT.
| Extent | ||
| width : Number [read-only]
Distance between xmin and xmax.
| Extent | ||
| xmax : Number
Top-right x-coordinate of an extent envelope.
| Extent | ||
| xmin : Number
Bottom-left x-coordinate of an extent envelope.
| Extent | ||
| ymax : Number
Top-right y-coordinate of an extent envelope.
| Extent | ||
| ymin : Number
Bottom-left y-coordinate of an extent envelope.
| Extent | ||
| Method | Defined by | ||
|---|---|---|---|
|
Extent(xmin:Number = 0, ymin:Number = 0, xmax:Number = 0, ymax:Number = 0, spatialReference:SpatialReference = null)
Creates a new Extent object.
| Extent | ||
|
Returns a new extent of the same size but re-centered on the specified location.
| Extent | ||
|
Checks if a point is contained in "this" extent.
| Extent | ||
|
containsExtent(env:Extent):Boolean
Checks if another extent is completely contained within "this" extent.
| Extent | ||
|
Returns a new expanded extent.
| Extent | ||
|
Returns a new extent of the area that are in both extents.
| Extent | ||
|
intersects(geometry:Geometry):Boolean
Checks if the geometry in the argument intersects "this" extent.
| Extent | ||
|
Returns a new extent with the given offset from "this" extent.
| Extent | ||
|
Returns a new extent that covers both areas.
| Extent | ||
|
update(xmin:Number, ymin:Number, xmax:Number, ymax:Number, spatialReference:SpatialReference = null):void
Updates extent with new values.
| Extent | ||
| center | property |
center:MapPoint [read-only]Returns the centerpoint of the extent.
This property can be used as the source for data binding.
Implementation public function get center():MapPoint
| extent | property |
extent:Extent [read-only]The extent of this Extent.
This property can be used as the source for data binding.
Implementation public function get extent():Extent
| height | property |
height:Number [read-only]Distance between ymin and ymax.
This property can be used as the source for data binding.
Implementation public function get height():Number
| type | property |
type:String [read-only]The type of geometry is EXTENT.
This property can be used as the source for data binding.
Implementation public function get type():String
| width | property |
width:Number [read-only]Distance between xmin and xmax.
This property can be used as the source for data binding.
Implementation public function get width():Number
| xmax | property |
xmax:Number [read-write]Top-right x-coordinate of an extent envelope.
This property can be used as the source for data binding.
Implementation public function get xmax():Number
public function set xmax(value:Number):void
| xmin | property |
xmin:Number [read-write]Bottom-left x-coordinate of an extent envelope.
This property can be used as the source for data binding.
Implementation public function get xmin():Number
public function set xmin(value:Number):void
| ymax | property |
ymax:Number [read-write]Top-right y-coordinate of an extent envelope.
This property can be used as the source for data binding.
Implementation public function get ymax():Number
public function set ymax(value:Number):void
| ymin | property |
ymin:Number [read-write]Bottom-left y-coordinate of an extent envelope.
This property can be used as the source for data binding.
Implementation public function get ymin():Number
public function set ymin(value:Number):void
| Extent | () | constructor |
public function Extent(xmin:Number = 0, ymin:Number = 0, xmax:Number = 0, ymax:Number = 0, spatialReference:SpatialReference = null)Creates a new Extent object.
Parametersxmin:Number (default = 0) — Bottom-left x-coordinate of an extent envelope.
|
|
ymin:Number (default = 0) — Bottom-left y-coordinate of an extent envelope.
|
|
xmax:Number (default = 0) — Top-right x-coordinate of an extent envelope.
|
|
ymax:Number (default = 0) — Top-right y-coordinate of an extent envelope.
|
|
spatialReference:SpatialReference (default = null) — Spatial reference of the geometry.
|
| centerAt | () | method |
public function centerAt(point:MapPoint):ExtentReturns a new extent of the same size but re-centered on the specified location.
Parameterspoint:MapPoint — The point to center at.
|
Extent —
A new extent is returned with the same width and height centered at the argument point.
|
| contains | () | method |
public function contains(point:MapPoint):BooleanChecks if a point is contained in "this" extent.
Parameterspoint:MapPoint — The location to check for.
|
Boolean — True if the extent contains the point, false otherwise.
|
See also
if( extent.contains( MapPoint(graphic.geometry) ) ) | containsExtent | () | method |
public function containsExtent(env:Extent):BooleanChecks if another extent is completely contained within "this" extent.
Parametersenv:Extent — other extent.
|
Boolean — True if this extent contains the passed extent.
|
| expand | () | method |
public function expand(factor:Number):ExtentReturns a new expanded extent. For example, a value of 1.5 will create an extent that is 50% bigger.
Parametersfactor:Number — The multiplier value.
|
Extent —
A new expanded extent.
|
| intersection | () | method |
public function intersection(extent:Extent):ExtentReturns a new extent of the area that are in both extents.
Parametersextent:Extent — The minx, miny, maxx and maxy bounding box.
|
Extent —
The intersecting extent or null if extents do not intersect.
|
| intersects | () | method |
public function intersects(geometry:Geometry):BooleanChecks if the geometry in the argument intersects "this" extent.
Note: as of version 1.3 this method accepts any geometry. Before it only accepted other extents.
Parametersgeometry:Geometry — The input geometry.
|
Boolean — true if intersects, false otherwise.
|
| offset | () | method |
public function offset(dx:Number, dy:Number):ExtentReturns a new extent with the given offset from "this" extent. Units are in map units.
Parametersdx:Number — The offset distance in map units for the x-coordinate.
|
|
dy:Number — The offset distance in map units for the y-coordinate.
|
Extent —
A new offset extent.
|
| union | () | method |
public function union(extent:Extent):ExtentReturns a new extent that covers both areas.
Parametersextent:Extent — The minx, miny, maxx and maxy bounding box.
|
Extent —
A new union extent.
|
| update | () | method |
public function update(xmin:Number, ymin:Number, xmax:Number, ymax:Number, spatialReference:SpatialReference = null):voidUpdates extent with new values.
Parametersxmin:Number — The new minimum x-coordinate value.
|
|
ymin:Number — The new minimum y-coordinate value.
|
|
xmax:Number — The new maximum x-coordinate value.
|
|
ymax:Number — The new maximum y-coordinate value.
|
|
spatialReference:SpatialReference (default = null) — The new spatial reference.
|