Packagecom.esri.ags.geometry
Classpublic class Multipoint
InheritanceMultipoint Inheritance Geometry Inheritance Object

An array of MapPoints.

Default MXML Propertypoints

View the examples

See also

MapPoint
Live Sample - drawing Multipoints using DrawTool.


Public Properties
 PropertyDefined By
  extent : Extent
[override] [read-only] The extent of this Multipoint.
Multipoint
  points : Array
The array of MapPoint(s).
Multipoint
 InheritedspatialReference : SpatialReference
The spatial reference of the geometry.
Geometry
  type : String
[override] [read-only] The type of geometry is MULTIPOINT.
Multipoint
Public Methods
 MethodDefined By
  
Multipoint(points:Array = null, spatialReference:SpatialReference = null)
Creates a new Multipoint object.
Multipoint
  
addPoint(point:MapPoint):void
Adds a point to the array of MapPoint(s) or Multipoint(s).
Multipoint
  
getPoint(index:int):MapPoint
Returns a point at the specified index of the points array.
Multipoint
  
Removes a point from the Multipoint.
Multipoint
  
setPoint(index:int, point:MapPoint):void
Sets(updates) an existing point in the multipoint.
Multipoint
Public Constants
 ConstantDefined By
 InheritedEXTENT : String = esriGeometryEnvelope
[static] An extent is defined by xmin, ymin, xmax and ymax.
Geometry
 InheritedMAPPOINT : String = esriGeometryPoint
[static] A MapPoint is a basic point with x (often longitude), y (often latitude) and an optional spatial reference.
Geometry
 InheritedMULTIPOINT : String = esriGeometryMultipoint
[static] A multipoint consists of one or more MapPoint(s).
Geometry
 InheritedPOLYGON : String = esriGeometryPolygon
[static] A polygon is a set of areas with three or more points.
Geometry
 InheritedPOLYLINE : String = esriGeometryPolyline
[static] A polyline is set of lines with two or more points.
Geometry
Property Detail
extentproperty
extent:Extent  [read-only] [override]

The extent of this Multipoint. The extent is null for Multipoint having single point.


Implementation
    public function get extent():Extent
pointsproperty 
points:Array

The array of MapPoint(s).


Implementation
    public function get points():Array
    public function set points(value:Array):void
typeproperty 
type:String  [read-only] [override]

The type of geometry is MULTIPOINT.


Implementation
    public function get type():String
Constructor Detail
Multipoint()Constructor
public function Multipoint(points:Array = null, spatialReference:SpatialReference = null)

Creates a new Multipoint object.

Parameters
points:Array (default = null) — The array of MapPoints.
 
spatialReference:SpatialReference (default = null) — The spatial reference of the MapPoint(s).
Method Detail
addPoint()method
public function addPoint(point:MapPoint):void

Adds a point to the array of MapPoint(s) or Multipoint(s). When added the index is incremented by one.

Parameters

point:MapPoint — The array of MapPoint(s).

getPoint()method 
public function getPoint(index:int):MapPoint

Returns a point at the specified index of the points array.

Parameters

index:int — The index of a point in points array.

Returns
MapPoint — A copy of the point at the specified index.
removePoint()method 
public function removePoint(index:int):MapPoint

Removes a point from the Multipoint. The index specifies which point to remove.

Parameters

index:int — The index of the point to remove.

Returns
MapPoint
setPoint()method 
public function setPoint(index:int, point:MapPoint):void

Sets(updates) an existing point in the multipoint.

Parameters

index:int — The index of the updated point in the points array.
 
point:MapPoint — The updated point.

Examples
MXML usage of MultiPoint (with SpatialReference as a child):
 <esri:Multipoint>
    <esri:MapPoint x="14" y="2.5"/>
    <esri:MapPoint x="14" y="3.5"/>
 </esri:Multipoint>
MXML usage of MultiPoint in a Graphic:
 <esri:Graphic symbol="{sms_basic}" toolTip="Multipoint SimpleMarkerSymbol">
    <esri:geometry>
        <esri:Multipoint>
            <esri:MapPoint x="14" y="2.5"/>
            <esri:MapPoint x="14" y="3.5"/>
        </esri:Multipoint>
    </esri:geometry>
    <esri:symbol>
        <esri:SimpleMarkerSymbol"/>
    </esri:symbol>
 </esri:Graphic>