| Package | com.esri.ags.geometry |
| Class | public class Extent |
| Inheritance | Extent Geometry Object |
| Implements | flash.events.IEventDispatcher |
| Subclasses | WebMercatorExtent |
Default MXML PropertyspatialReference
See also
| Property | Defined By | ||
|---|---|---|---|
| center : MapPoint [read-only]
Returns the centerpoint of the extent. | Extent | ||
| extent : Extent [override] [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 [override] [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 geometry is contained in "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 Polygon with one ring containing points equivalent to the coordinates of 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.
public function get center():MapPoint| extent | property |
extent:Extent [read-only] [override] The extent of this Extent.
public function get extent():Extent| height | property |
height:Number [read-only] Distance between ymin and ymax.
public function get height():Number| type | property |
type:String [read-only] [override] The type of geometry is EXTENT.
public function get type():String| width | property |
width:Number [read-only] Distance between xmin and xmax.
public function get width():Number| xmax | property |
xmax:NumberTop-right x-coordinate of an extent envelope.
This property can be used as the source for data binding.
public function get xmax():Number public function set xmax(value:Number):void| xmin | property |
xmin:NumberBottom-left x-coordinate of an extent envelope.
This property can be used as the source for data binding.
public function get xmin():Number public function set xmin(value:Number):void| ymax | property |
ymax:NumberTop-right y-coordinate of an extent envelope.
This property can be used as the source for data binding.
public function get ymax():Number public function set ymax(value:Number):void| ymin | property |
ymin:NumberBottom-left y-coordinate of an extent envelope.
This property can be used as the source for data binding.
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.
Parameters
point: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(geometry:Geometry):BooleanChecks if a geometry is contained in "this" extent.
Parameters
geometry:Geometry — The input geometry.
|
Boolean — Returns true if "this" extent contains the geometry, false otherwise.
|
See also
if (extent.contains(graphic.geometry))| 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.
Parameters
factor: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.
Parameters
extent:Extent — The xmin, ymin, xmax and ymax bounding box.
|
Extent — The intersecting extent or null if extents don't intersect.
|
| intersects | () | method |
public function intersects(geometry:Geometry):BooleanChecks if the geometry in the argument intersects "this" extent.
Parameters
geometry:Geometry — The input geometry.
|
Boolean — Returns true if input geometries intersect "this" extent, 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.
Parameters
dx: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.
|
| toPolygon | () | method |
public function toPolygon():Polygon| Since : | ArcGIS API for Flex 2.3 |
Returns a new Polygon with one ring containing points equivalent to the coordinates of this extent.
ReturnsPolygon — A new equivalent Polygon.
|
| union | () | method |
public function union(extent:Extent):ExtentReturns a new extent that covers both areas.
Parameters
extent:Extent — The xmin, ymin, xmax and ymax 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.
Parameters
xmin: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.
|
<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}"/>