Packagecom.google.maps.interfaces
Interfacepublic interface IPolygon extends IOverlay, IWrappableEventDispatcher, flash.events.IEventDispatcher, IWrappable
ImplementorsPolygon

IPolygon is the interface implemented by Polygon and equivalent user-created classes. Polygon is a map overlay that represents polygon objects.



Public Properties
 PropertyDefined by
 Inheritedforeground : DisplayObject
Display object that represents the overlay's content.
IOverlay
 InheritedinterfaceChain : Array
List of interfaces for wrapping this object.
IWrappable
 Inheritedpane : IPane
Pane this overlay resides on (null if the overlay is not added to the map).
IOverlay
 Inheritedshadow : DisplayObject
Display object that represents the overlay's shadow (null if the overlay never has a shadow).
IOverlay
 Inheritedvisible : Boolean
Visibility of the overlay.
IOverlay
 Inheritedwrapper : Object
Instance of the cross-domain wrapper for this object.
IWrappable
Public Methods
 MethodDefined by
 Inherited
Retrieves the base event dispatcher object that allows access to event dispatching capability for cross-domain objects.
IWrappableEventDispatcher
 Inherited
Retrieves the default pane that this overlay should be placed on if none is explicitly specified (when the overlay is added through the IMap.addOverlay() call).
IOverlay
  
Returns the number of polylines that make up the inner boundaries of this polygon.
IPolygon
  
getInnerVertex(line:Number, index:Number):LatLng
Returns the LatLng of the vertex with the specified index from the specified inner polyline boundary.
IPolygon
  
getInnerVertexCount(line:Number):Number
Returns the number of vertices in a specified inner line.
IPolygon
  
Returns the LatLngBounds of this polygon, or null if the polygon contains no points.
IPolygon
  
Retrieves the polygon's options.
IPolygon
  
getOuterVertex(index:Number):LatLng
Returns the vertex from the outer boundary with the specified index.
IPolygon
  
Returns the number of vertices in the outer line.
IPolygon
 Inherited
positionOverlay(zoomChanged:Boolean):void
Reposition the overlay on the screen.
IOverlay
  
setOptions(options:PolygonOptions):void
Updates the polygon's options.
IPolygon
Method detail
getInnerPolylineCount()method
public function getInnerPolylineCount():Number

Returns the number of polylines that make up the inner boundaries of this polygon.

Returns
Number — Number of polylines making up the inner polygon boundaries.
getInnerVertex()method 
public function getInnerVertex(line:Number, index:Number):LatLng

Returns the LatLng of the vertex with the specified index from the specified inner polyline boundary.

Parameters
line:Number — Index of the inner polyline.
 
index:Number — Index of the target vertex within the specified polyline.

Returns
LatLng — Lat-lng of the specified vertex.
getInnerVertexCount()method 
public function getInnerVertexCount(line:Number):Number

Returns the number of vertices in a specified inner line.

Parameters
line:Number — Index of the inner line.

Returns
Number — Number of vertices.
getLatLngBounds()method 
public function getLatLngBounds():LatLngBounds

Returns the LatLngBounds of this polygon, or null if the polygon contains no points.

Returns
LatLngBounds
getOptions()method 
public function getOptions():PolygonOptions

Retrieves the polygon's options. Use the setOptions() method to modify options on the polygon.

Returns
PolygonOptions — Full set of options on the polygon.

See also

getOuterVertex()method 
public function getOuterVertex(index:Number):LatLng

Returns the vertex from the outer boundary with the specified index.

Parameters
index:Number — Index of the target vertex.

Returns
LatLng — Lat-lng of the specified vertex.
getOuterVertexCount()method 
public function getOuterVertexCount():Number

Returns the number of vertices in the outer line.

Returns
Number — Number of vertices.
setOptions()method 
public function setOptions(options:PolygonOptions):void

Updates the polygon's options. The options parameter may specify a complete or partial set of polygon options. If a partial set of options is specified, it will supplement the existing polygon options, overriding only the values that were set explicitly and leaving the rest unchanged. For example, the following piece of code will modify the polygon's fill alpha, leaving the rest of its options unchanged. var options:PolygonOptions = new PolygonOptions( { fillStyle: { alpha: 0.2 }} ); myPolygon.setOptions(options);

Parameters
options:PolygonOptions — New full or partial set of options for the polygon.