| Package | com.esri.aws.awx.geom |
| Class | public class PolygonShape |
| Implements | com.esri.aws.awx.geom.IShape |
Custom shapes can be created by extending this class and changing the constructor arguments.
Default MXML PropertygeoPoints
| Property | Defined by | ||
|---|---|---|---|
| extent : Extent
[read-only]
Retrieves the bounding box (maxX, maxY, minX, minY) of this polygon.
| PolygonShape | ||
| geoPoints : Array
The array lat/lon locations.
| PolygonShape | ||
| Method | Defined by | ||
|---|---|---|---|
|
PolygonShape(geoPoints:Array = null)
Creates a new PolygonShape.
| PolygonShape | ||
|
contains(px:Number, py:Number):Boolean
| PolygonShape | ||
|
containsPoint(pt:GeoPoint):Boolean
| PolygonShape | ||
|
deepClone():IShape
Creates a deep copy of the shape.
| PolygonShape | ||
| extent | property |
extent:Extent [read-only]Retrieves the bounding box (maxX, maxY, minX, minY) of this polygon.
Implementation public function get extent():Extent
| geoPoints | property |
geoPoints:Array [read-write]The array lat/lon locations.
Implementation public function get geoPoints():Array
public function set geoPoints(value:Array):void
| PolygonShape | () | constructor |
public function PolygonShape(geoPoints:Array = null)Creates a new PolygonShape.
ParametersgeoPoints:Array (default = null) — an array of GeoPoints.
|
| contains | () | method |
public function contains(px:Number, py:Number):BooleanParameters
px:Number |
|
py:Number |
Boolean |
| containsPoint | () | method |
| deepClone | () | method |
public function deepClone():IShapeCreates a deep copy of the shape.
ReturnsIShape — A copy of the shape.
|
PolygonShape or PolylineShape to create a new shape.
package com.esri.aws.awx.geom
{
import com.esri.aws.awx.geom.PolygonShape;
import com.esri.aws.services.Envelope;
public class CustomPolygonShape extends PolygonShape
{
public function CustomPolygonShape(envelope:Envelope)
{
var geoPoint1:GeoPoint = new GeoPoint(envelope.minX, envelope.maxY);
var geoPoint2:GeoPoint = new GeoPoint(envelope.maxX, envelope.maxY);
var geoPoint3:GeoPoint = new GeoPoint(envelope.maxX, envelope.minY);
var geoPoint4:GeoPoint = new GeoPoint(envelope.minX, envelope.minY);
super([geoPoint1, geoPoint2, geoPoint3, geoPoint4]);
}
}
}