Packagecom.google.maps.interfaces
Interfacepublic interface IPolyline extends IOverlay, IWrappableEventDispatcher, flash.events.IEventDispatcher, IWrappable
ImplementorsPolyline

IPolyline is the interface implemented by Polyline and equivalent user-created classes. Polyline is a map overlay representing polyline objects and is constructed from a list of vertices.



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 LatLngBounds of this polyline or a subsequence of this polyline.
IPolyline
  
getLength(opt_radius:Number):Number
Returns the length (in meters) of the polyline along the surface of a spherical Earth.
IPolyline
  
Retrieves the polyline's options.
IPolyline
  
getVertex(index:Number):LatLng
Returns the vertex with the specified index.
IPolyline
  
getVertexCount():Number
Returns the number of vertices in this polyline.
IPolyline
 Inherited
positionOverlay(zoomChanged:Boolean):void
Reposition the overlay on the screen.
IOverlay
  
Updates the polyline options.
IPolyline
Method detail
getLatLngBounds()method
public function getLatLngBounds():LatLngBounds

Returns the LatLngBounds of this polyline or a subsequence of this polyline. Returns null if this polyline contains no points.

Returns
LatLngBounds
getLength()method 
public function getLength(opt_radius:Number):Number

Returns the length (in meters) of the polyline along the surface of a spherical Earth.

Parameters
opt_radius:Number — Radius of the spherical celestial object.

Returns
Number — Polyline length in meters.
getOptions()method 
public function getOptions():PolylineOptions

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

Returns
PolylineOptions — Full set of options on the polyline.

See also

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

Returns the vertex with the specified index.

Parameters
index:Number — Index of the target vertex.

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

Returns the number of vertices in this polyline.

Returns
Number — The number of vertices.
setOptions()method 
public function setOptions(options:PolylineOptions):void

Updates the polyline options. The options parameter may specify a complete or partial set of polyline options. If a partial set of options is specified, it will supplement the existing polyline options, overriding only the values that were set explicitly and leaving the rest unchanged. For example, the following piece of code will modify the polyline's stroke thickness, leaving the rest of its options unchanged. var options:PolylineOptions = new PolylineOptions( { strokeStyle: { thickness: 3 }} ); myPolyline.setOptions(options);

Parameters
options:PolylineOptions — New full or partial set of options for the polyline.