Packagecom.esri.ags.symbol
Classpublic class SimpleLineSymbol
InheritanceSimpleLineSymbol Inheritance LineSymbol Inheritance Symbol Inheritance flash.events.EventDispatcher
SubclassesCartographicLineSymbol

Used to draw linear features on the graphics layer using simple line patterns. SimpleLineSymbol is either a solid line or a predefined pattern of dashes and dots.


Example
MXML usages of SimpleLineSymbol:
 <esri:SimpleLineSymbol id="sls" color="0xFF3333" width="2" alpha="0.5"/>

First ActionScript usage of SimpleLineSymbol:
 var sls:SimpleLineSymbol = new SimpleLineSymbol(SimpleLineSymbol.STYLE_SOLID, 0xFF0000, 0.8, 2);

Second ActionScript usage of SimpleLineSymbol:
 var myOtherLineSymbol:SimpleLineSymbol = new SimpleLineSymbol();
 myOtherLineSymbol.color = 0xFFFF99;
 myOtherLineSymbol.width = 2;
 myOtherLineSymbol.alpha = 1.0;

See also

CartographicLineSymbol
Live sample - Line Symbols
Live sample - Change Line Symbols on-the-fly


Public Properties
 PropertyDefined by
 Inheritedalpha : Number
Line symbol alpha (transparency).
LineSymbol
 Inheritedcolor : uint
Line symbol color.
LineSymbol
  style : String
The line style.
SimpleLineSymbol
 Inheritedwidth : Number
Line symbol width in pixels.
LineSymbol
Public Methods
 MethodDefined by
  
SimpleLineSymbol(style:String, color:Number = 0x000000, alpha:Number = 1, width:Number = 1)
Creates a new SimpleLineSymbol.
SimpleLineSymbol
 Inherited
clear(sprite:Sprite):void
Clears the graphics that were drawn to the sprite object.
Symbol
 Inherited
destroy(sprite:Sprite):void
Removes all the graphics that were drawn to the sprite object and resets its properties.
Symbol
 Inherited
draw(sprite:Sprite, geometry:Geometry, attributes:Object, map:Map):void
Draw the graphics on the sprite object.
Symbol
Protected Methods
 MethodDefined by
 Inherited
Helper function to dispatch a change event.
Symbol
 Inherited
removeAllChildren(sprite:Sprite):void
Removes all children from the sprite object.
Symbol
 Inherited
toScreenX(map:Map, mapX:Number):Number
Converts the x-coordinate of map point to a screen point.
Symbol
 Inherited
toScreenY(map:Map, mapY:Number):Number
Converts the y-coordinate of map point to a screen point.
Symbol
Public Constants
 ConstantDefined by
  STYLE_DASH : String = "dash"
[static] The line is made of dashes.
SimpleLineSymbol
  STYLE_DASHDOT : String = "dashdot"
[static] The line is made of a dash-dot pattern.
SimpleLineSymbol
  STYLE_DASHDOTDOT : String = "dashdotdot"
[static] The line is made of a dash-dot-dot pattern.
SimpleLineSymbol
  STYLE_DOT : String = "dot"
[static] The line is made of dots.
SimpleLineSymbol
  STYLE_NULL : String = "none"
[static] The line has no symbol.
SimpleLineSymbol
  STYLE_SOLID : String = "solid"
[static] The line is solid.
SimpleLineSymbol
Property detail
styleproperty
style:String  [read-write]

The line style.

The default value is STYLE_SOLID.

This property can be used as the source for data binding.

Implementation
    public function get style():String
    public function set style(value:String):void
Constructor detail
SimpleLineSymbol()constructor
public function SimpleLineSymbol(style:String, color:Number = 0x000000, alpha:Number = 1, width:Number = 1)

Creates a new SimpleLineSymbol.

Parameters
style:String — The line style.
 
color:Number (default = 0x000000) — The line color.
 
alpha:Number (default = 1) — The line transparency.
 
width:Number (default = 1) — The line thickness in pixels.
Constant detail
STYLE_DASHconstant
public static const STYLE_DASH:String = "dash"

The line is made of dashes.

STYLE_DASHDOTconstant 
public static const STYLE_DASHDOT:String = "dashdot"

The line is made of a dash-dot pattern.

STYLE_DASHDOTDOTconstant 
public static const STYLE_DASHDOTDOT:String = "dashdotdot"

The line is made of a dash-dot-dot pattern.

STYLE_DOTconstant 
public static const STYLE_DOT:String = "dot"

The line is made of dots.

STYLE_NULLconstant 
public static const STYLE_NULL:String = "none"

The line has no symbol.

STYLE_SOLIDconstant 
public static const STYLE_SOLID:String = "solid"

The line is solid.