Packagecom.distriqt.extension.nativemaps.objects
Classpublic class Polygon
InheritancePolygon Inheritance Polyline Inheritance Object

Polygon object representing a shape overlay for the map



Public Properties
 PropertyDefined By
 Inheritedcolour : int
Defines the colour of the line as an int in the ARGB format.
Polyline
 InheritedencodedPath : String
Set an encoded string representation of the points making up this polyline.
Polyline
  fillColour : int
Defines the fill colour of the shape as an int in the ARGB format.
Polygon
 Inheritedgeodesic : Boolean
Defines whether the line is drawn using geodesic curves (true) or the Mercator projection (false).
Polyline
  holes : Vector.<Polygon>
Defines "holes" in the polygon, if desired.
Polygon
 Inheritedname : String
A custom name you may set for the polyline overlay to be used as a reference. This name is not used internally but simply provides a helpful way to identify overlays. NOTE: Overlay names should be unique, you are responsible for managing these.
Polyline
 Inheritedpoints : Vector.<LatLng>
The current list of LatLng points in this line.
Polyline
 Inheritedvisible : Boolean
Defines whether the line is visible or not, defaults to true.
Polyline
 InheritedvisibleAsInt : int
[read-only]
Polyline
 Inheritedwidth : Number
Defines the stroke width of the line in pixels, defaults to 1.0
Polyline
 InheritedzIndex : Number
Defines the Z Index or display order of this line.
Polyline
Public Methods
 MethodDefined By
  
Polygon(width:uint = 1, strokeColour:uint = 0xFF000000, fillColour:uint = 0xFFFF0000, zIndex:int = 0, visible:Boolean = true)
Constructor
Polygon
  
Adds a new hole polygon to this polygon overlay.
Polygon
 Inherited
Adds a new point to the line
Polyline
 Inherited
addPoints(points:Vector.<LatLng>):Polyline
Add an array of points to the line
Polyline
 Inherited
clear():void
Removes all existing line points
Polyline
  
hasHoles():Boolean
Boolean value representing whether or not a hole is defined for this polygon.
Polygon
 Inherited
setColour(colour:int):Polyline
Sets the colour of the line as an int in the ARGB format.
Polyline
 Inherited
setEncodedPath(encodedPath:String):Polyline
Set an encoded string representation of the points making up this polyline.
Polyline
 Inherited
setGeodesic(useGeodesic:Boolean):Polyline
Defines whether the line is drawn using geodesic curves (true) or the Mercator projection (false).
Polyline
 Inherited
setName(name:String):Polyline
Sets a name for the polyline overlay to be used as a reference.
Polyline
 Inherited
setVisibility(visible:Boolean):Polyline
Defines whether the line is visible or not, defaults to true
Polyline
 Inherited
setWidth(width:Number):Polyline
Defines the stroke width of the line in pixels, defaults to 1.0
Polyline
 Inherited
setZIndex(zIndex:Number):Polyline
Defines the Z Index or display order of this line
Polyline
Property Detail
fillColourproperty
fillColour:int

Defines the fill colour of the shape as an int in the ARGB format.

This number should represent an ARGB colour value. For example: Non transparent red: 0xFFFF0000 Semi-transparent red: 0xAAFF0000


Implementation
    public function get fillColour():int
    public function set fillColour(value:int):void
holesproperty 
holes:Vector.<Polygon>

Defines "holes" in the polygon, if desired.

Defining a hole polygon will render a gap or hole in the polygon, allowing more complex shapes. The polygon options of the hole object are irrelevant except for the points list. You may add multiple holes to a polygon providing they are fully contained within the parent polygon and do not overlap with other holes.


Implementation
    public function get holes():Vector.<Polygon>
    public function set holes(value:Vector.<Polygon>):void
Constructor Detail
Polygon()Constructor
public function Polygon(width:uint = 1, strokeColour:uint = 0xFF000000, fillColour:uint = 0xFFFF0000, zIndex:int = 0, visible:Boolean = true)

Constructor

Parameters
width:uint (default = 1)
 
strokeColour:uint (default = 0xFF000000)
 
fillColour:uint (default = 0xFFFF0000)
 
zIndex:int (default = 0)
 
visible:Boolean (default = true)
Method Detail
addHole()method
public function addHole(hole:Polygon):Polygon

Adds a new hole polygon to this polygon overlay.

A hole must be enclosed completely by the parent polygon. Holes must not overlay with other holes.

Parameters

hole:Polygon

Returns
PolygonPolygon instance for chaining
hasHoles()method 
public function hasHoles():Boolean

Boolean value representing whether or not a hole is defined for this polygon.

Returns
Boolean — boolean Whether or not a valid hole exists in this polygon