Package | com.distriqt.extension.nativemaps.objects |
Class | public class Polygon |
Inheritance | Polygon Polyline Object |
Polygon object representing a shape overlay for the map
Property | Defined By | ||
---|---|---|---|
colour : int
Defines the colour of the line as an int in the ARGB format. | Polyline | ||
encodedPath : 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 | ||
geodesic : 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 | ||
name : 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 | ||
points : Vector.<LatLng>
The current list of LatLng points in this line. | Polyline | ||
visible : Boolean
Defines whether the line is visible or not, defaults to true. | Polyline | ||
visibleAsInt : int [read-only] | Polyline | ||
width : Number
Defines the stroke width of the line in pixels, defaults to 1.0
| Polyline | ||
zIndex : Number
Defines the Z Index or display order of this line. | Polyline |
Method | Defined 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 | ||
Adds a new point to the line
| Polyline | ||
Add an array of points to the line
| Polyline | ||
clear():void
Removes all existing line points
| Polyline | ||
hasHoles():Boolean
Boolean value representing whether or not a hole is defined for this polygon. | Polygon | ||
Sets the colour of the line as an int in the ARGB format. | Polyline | ||
setEncodedPath(encodedPath:String):Polyline
Set an encoded string representation of the points making up this polyline. | Polyline | ||
setGeodesic(useGeodesic:Boolean):Polyline
Defines whether the line is drawn using geodesic curves (true) or the Mercator projection (false). | Polyline | ||
Sets a name for the polyline overlay to be used as a reference. | Polyline | ||
setVisibility(visible:Boolean):Polyline
Defines whether the line is visible or not, defaults to true
| Polyline | ||
Defines the stroke width of the line in pixels, defaults to 1.0
| Polyline | ||
Defines the Z Index or display order of this line
| Polyline |
fillColour | property |
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
public function get fillColour():int
public function set fillColour(value:int):void
holes | property |
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.
public function get holes():Vector.<Polygon>
public function set holes(value:Vector.<Polygon>):void
Polygon | () | Constructor |
public function Polygon(width:uint = 1, strokeColour:uint = 0xFF000000, fillColour:uint = 0xFFFF0000, zIndex:int = 0, visible:Boolean = true)
Constructor
Parameterswidth:uint (default = 1 )
| |
strokeColour:uint (default = 0xFF000000 )
| |
fillColour:uint (default = 0xFFFF0000 )
| |
zIndex:int (default = 0 )
| |
visible:Boolean (default = true )
|
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 |
Polygon — Polygon instance for chaining
|
hasHoles | () | method |
public function hasHoles():Boolean
Boolean value representing whether or not a hole is defined for this polygon.
ReturnsBoolean — boolean Whether or not a valid hole exists in this polygon
|