Packagecom.esri.ags.symbols
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.

View the examples

See also

SimpleLineSymbol
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 = solid, color:Number = 0x000000, alpha:Number = 1, width:Number = 1, cap:String = butt, join:String = miter, 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
createSwatch(width:Number = 50, height:Number = 50):UIComponent
Creates a swatch for a symbol which can be used in a legend.
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
 Inherited
initialize(sprite:Sprite, geometry:Geometry, attributes:Object, map:Map):void
Initialize the sprite.
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
[override] 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

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.


Implementation
    public function get cap():String
    public function set cap(value:String):void
joinproperty 
join:String

The type of joint appearance used at angles.

The default value is JOIN_MITER.


Implementation
    public function get join():String
    public function set join(value:String):void
miterLimitproperty 
miterLimit:Number

The limit at which a miter is cut off.

The default value is 10.


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

Creates a new CartographicLineSymbol.

Parameters
style:String (default = solid) — 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 (default = butt) — The cap type.
 
join:String (default = miter) — The join type.
 
miterLimit:Number (default = 10) — The miter limit.
Method Detail
setLineStyle()method
override protected 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.

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