| Package | com.yahoo.maps.api.overlays |
| Class | public class PolylineOverlay |
| Inheritance | PolylineOverlay Overlay flash.display.Sprite |
var overlay:PolylineOverlay = new PolylineOverlay(0x333333, 1, 2,false, false); overlay.dataProvider = [new LatLon(33.9455, -118.4001), new LatLon(40.6446, -73.7948), new LatLon(47.448,-122.298) ]; _map.overlayManager.addOverlay(overlay);
| Property | Defined by | ||
|---|---|---|---|
![]() | container : Sprite
A reference to the maps overlay container.
| Overlay | |
| dataProvider : Array
An array of LatLon points of which the polyline will draw along.
| PolylineOverlay | ||
| fillAlpha : Number = 1
The alpha value for the fill area.
| PolylineOverlay | ||
| fillColor : uint
The hexidecimal color value for the fill area.
| PolylineOverlay | ||
| geodesic : Boolean
Determines whether the polyline will be drawn as a geodesic.
| PolylineOverlay | ||
| geodesicElements : Number
The amount of line segments that create the geodesic.
| PolylineOverlay | ||
| hasFill : Boolean
Determines whether the polyline has a fill.
| PolylineOverlay | ||
| lineAlpha : Number
The alpha value for the line.
| PolylineOverlay | ||
| lineColor : uint
The hexidecimal color value for the line.
| PolylineOverlay | ||
| lineThickness : Number
The thickness of the polyline in pixels
| PolylineOverlay | ||
| map : IYahooMap
[write-only]
| PolylineOverlay | ||
| Method | Defined by | ||
|---|---|---|---|
|
PolylineOverlay(lineColor:uint = 0x0145DB, lineAlpha:Number = 1, lineThickness:Number = 2, geodesic:Boolean = false, hasFill:Boolean = false)
Creates a new PolylineOverlay object
| PolylineOverlay | ||
|
clear():void
Clears the polyline graphics using
this.graphics.clear();
| PolylineOverlay | ||
|
Returns a clone of the overlay.
| PolylineOverlay | ||
![]() |
destroy():void
Frees the overlays resources in preparation for garbage collection.
| Overlay | |
|
drawBoundingBox(boundingBox:BoundingBox):void
Draws the overlay based on the northwest, northeast, southeast and southwest corners of the provided bounding box object.
| PolylineOverlay | ||
|
Returns the point-to-point distance along the polyline.
| PolylineOverlay | ||
![]() |
getLatLonToLocalPoint(latlon:LatLon):Point
Converts a LatLon point to a local XY Point
| Overlay | |
![]() |
getLocalPointToLatLon(point:Point):LatLon
Converts a local XY point to a LatLon object.
| Overlay | |
|
Returns a BoundingBox object that contains the geographical area of the shape.
| PolylineOverlay | ||
![]() |
lineToLatLon(latlon:LatLon):void
Draws a line using the current line style from the current drawing position to the specified LatLon location; the current drawing position is then set to the LatLon location.
| Overlay | |
![]() |
moveToLatLon(latlon:LatLon):void
Moves the current drawing position to the specified latitude and longitude point.
| Overlay | |
![]() |
onMapMove(event:YahooMapEvent):void
Map move event handler.
| Overlay | |
![]() |
onMapResize(event:YahooMapEvent):void
Map resize event handler.
| Overlay | |
|
onMapZoom(event:YahooMapEvent):void
Map zoom event handler.
| PolylineOverlay | ||
![]() |
onTypeChanged(event:YahooMapEvent):void
Map type change event handler.
| Overlay | |
|
redraw():void
Redraws the polyline using the assigned locations in the data provider.
| PolylineOverlay | ||
|
setProviderByMarkerSet(markers:Array):void
Sets the polyline
dataProvider with the latlon properties from a marker. | PolylineOverlay | ||
| dataProvider | property |
dataProvider:Array [read-write]An array of LatLon points of which the polyline will draw along.
Implementation public function get dataProvider():Array
public function set dataProvider(value:Array):void
| fillAlpha | property |
public var fillAlpha:Number = 1The alpha value for the fill area.
| fillColor | property |
public var fillColor:uintThe hexidecimal color value for the fill area.
| geodesic | property |
geodesic:Boolean [read-write]Determines whether the polyline will be drawn as a geodesic.
Implementation public function get geodesic():Boolean
public function set geodesic(value:Boolean):void
| geodesicElements | property |
geodesicElements:Number [read-write]The amount of line segments that create the geodesic. (Default=10)
Implementation public function get geodesicElements():Number
public function set geodesicElements(value:Number):void
| hasFill | property |
public var hasFill:BooleanDetermines whether the polyline has a fill.
| lineAlpha | property |
public var lineAlpha:NumberThe alpha value for the line.
| lineColor | property |
public var lineColor:uintThe hexidecimal color value for the line.
| lineThickness | property |
public var lineThickness:NumberThe thickness of the polyline in pixels
| map | property |
| PolylineOverlay | () | constructor |
public function PolylineOverlay(lineColor:uint = 0x0145DB, lineAlpha:Number = 1, lineThickness:Number = 2, geodesic:Boolean = false, hasFill:Boolean = false)Creates a new PolylineOverlay object
ParameterslineColor:uint (default = 0x0145DB) — The color of the line
|
|
lineAlpha:Number (default = 1) — The alpha value of the line.
|
|
lineThickness:Number (default = 2) — The thickness of the polyline.
|
|
geodesic:Boolean (default = false) — Determines whether the polyline will be drawn as a geodesic.
|
|
hasFill:Boolean (default = false) — Determines whether the polyline has a fill.
|
| clear | () | method |
public function clear():void
Clears the polyline graphics using this.graphics.clear();
| clone | () | method |
| drawBoundingBox | () | method |
public function drawBoundingBox(boundingBox:BoundingBox):voidDraws the overlay based on the northwest, northeast, southeast and southwest corners of the provided bounding box object.
ParametersboundingBox:BoundingBox |
See also
| getDistance | () | method |
public function getDistance():DistanceResultReturns the point-to-point distance along the polyline.
ReturnsDistanceResult |
See also
| getOverlayBounds | () | method |
public function getOverlayBounds():BoundingBoxReturns a BoundingBox object that contains the geographical area of the shape.
ReturnsBoundingBox |
| onMapZoom | () | method |
public override function onMapZoom(event:YahooMapEvent):voidMap zoom event handler.
Parametersevent:YahooMapEvent |
| redraw | () | method |
public function redraw():voidRedraws the polyline using the assigned locations in the data provider.
| setProviderByMarkerSet | () | method |
public function setProviderByMarkerSet(markers:Array):void
Sets the polyline dataProvider with the latlon properties from a marker.
Ideally, you would pass _yahooMap.markerManager.markers in order to draw a line between each marker currently added to the map.
markers:Array — An array of Marker objects.
|