Packagecom.esri.ags.symbol
Classpublic class CartographicLineSymbol
InheritanceCartographicLineSymbol Inheritance SimpleLineSymbol Inheritance LineSymbol Inheritance Symbol Inheritance flash.events.EventDispatcher

Used to draw linear features on the graphics layer. CartographicLineSymbol, like SimpleLineSymbol, is either a solid line or a predefined pattern of dashes and dots. In addition, CartographicLineSymbol, can further define the line symbol by line joins and line caps.


Example
MXML usage of CartographicLineSymbol:
 <esri:CartographicLineSymbol id="cls" cap="round" join="round"/>

See also

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


Public Properties
 PropertyDefined by
 Inheritedalpha : Number
Line symbol alpha (transparency).
LineSymbol
  cap : String
The type of caps at the end of lines.
CartographicLineSymbol
 Inheritedcolor : uint
Line symbol color.
LineSymbol
  join : String
The type of joint appearance used at angles.
CartographicLineSymbol
  miterLimit : Number
The limit at which a miter is cut off.
CartographicLineSymbol
 Inheritedstyle : String
The line style.
SimpleLineSymbol
 Inheritedwidth : Number
Line symbol width in pixels.
LineSymbol
Public Methods
 MethodDefined by
  
CartographicLineSymbol(style:String, color:Number = 0x000000, alpha:Number = 1, width:Number = 1, cap:String, join:String, miterLimit:Number = 10)
Creates a new CartographicLineSymbol.
CartographicLineSymbol
 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
  
setLineStyle(graphics:Graphics):void
Overrides the setLineStyle method.
CartographicLineSymbol
 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
  CAP_BUTT : String = "butt"
[static] Line ends square at the end point.
CartographicLineSymbol
  CAP_ROUND : String = "round"
[static] Line is rounded just beyond the end point.
CartographicLineSymbol
  CAP_SQUARE : String = "square"
[static] Line is squared just beyond the end point.
CartographicLineSymbol
  JOIN_BEVEL : String = "bevel"
[static] The joined lines are beveled
CartographicLineSymbol
  JOIN_MITER : String = "miter"
[static] The joined lines are not rounded or beveled.
CartographicLineSymbol
  JOIN_ROUND : String = "round"
[static] The joined lines are rounded.
CartographicLineSymbol
 InheritedSTYLE_DASH : String = "dash"
[static] The line is made of dashes.
SimpleLineSymbol
 InheritedSTYLE_DASHDOT : String = "dashdot"
[static] The line is made of a dash-dot pattern.
SimpleLineSymbol
 InheritedSTYLE_DASHDOTDOT : String = "dashdotdot"
[static] The line is made of a dash-dot-dot pattern.
SimpleLineSymbol
 InheritedSTYLE_DOT : String = "dot"
[static] The line is made of dots.
SimpleLineSymbol
 InheritedSTYLE_NULL : String = "none"
[static] The line has no symbol.
SimpleLineSymbol
 InheritedSTYLE_SOLID : String = "solid"
[static] The line is solid.
SimpleLineSymbol
Property detail
capproperty
cap:String  [read-write]

The type of caps at the end of lines.

Note: as of version 1.1, CartographicLineSymbol.CAP_BUTT now correctly ends a line with square end points.

The default value is CAP_BUTT.

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

Implementation
    public function get cap():String
    public function set cap(value:String):void
joinproperty 
join:String  [read-write]

The type of joint appearance used at angles.

The default value is JOIN_MITER.

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

Implementation
    public function get join():String
    public function set join(value:String):void
miterLimitproperty 
miterLimit:Number  [read-write]

The limit at which a miter is cut off.

The default value is 10.

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

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

Creates a new CartographicLineSymbol.

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.
 
cap:String — The cap type.
 
join:String — The join type.
 
miterLimit:Number (default = 10) — The miter limit.
Method detail
setLineStyle()method
protected override function setLineStyle(graphics:Graphics):void

Overrides the setLineStyle method.

Parameters
graphics:Graphics
Constant detail
CAP_BUTTconstant
public static const CAP_BUTT:String = "butt"

Line ends square at the end point.

CAP_ROUNDconstant 
public static const CAP_ROUND:String = "round"

Line is rounded just beyond the end point.

CAP_SQUAREconstant 
public static const CAP_SQUARE:String = "square"

Line is squared just beyond the end point.

JOIN_BEVELconstant 
public static const JOIN_BEVEL:String = "bevel"

The joined lines are beveled

JOIN_MITERconstant 
public static const JOIN_MITER:String = "miter"

The joined lines are not rounded or beveled.

JOIN_ROUNDconstant 
public static const JOIN_ROUND:String = "round"

The joined lines are rounded.