Class: SymbolE-mail This Topic Printable Version Give Us Feedback

Description

Symbols are used to display points, lines, and polygons on the graphics layer.

Symbol is the base symbol class and has no constructor. Instead, use the following:

Class hierarchy

esri.symbol.Symbol

Subclasses

FillSymbol  LineSymbol  MarkerSymbol  TextSymbol  

Properties

Property Type Description
color dojo.Color Symbol color, which is based on dojo.Color. Colors can be denoted in the following formats:

  • R, G, B: new dojo.Color([255,0,0])
  • R,G,B,A. The "A" value represents transparency where 0.0 is fully transparent and 1.0 has no transparency: new dojo.Color([255,0,0,0.25])
  • Hex string: new dojo.Color("#C0C0C0")
  • Named string: new dojo.Color("blue")
type String The type of symbol.

Methods

Method Return Value Description
setColor(color) Symbol Sets the symbol color.
toJson() Object Converts object to its ArcGIS Server JSON representation.
Properties Detail

<dojo.Color> color

Symbol color, which is based on dojo.Color. Colors can be denoted in the following formats:

  • R, G, B: new dojo.Color([255,0,0])
  • R,G,B,A. The "A" value represents transparency where 0.0 is fully transparent and 1.0 has no transparency: new dojo.Color([255,0,0,0.25])
  • Hex string: new dojo.Color("#C0C0C0")
  • Named string: new dojo.Color("blue")

<String> type

The type of symbol.
Known values: simplemarkersymbol | picturemarkersymbol | simplelinesymbol | cartographiclinesymbol | simplefillsymbol | picturefillsymbol | textsymbol
Methods Detail

setColor(color)

Sets the symbol color.
Return value: Symbol
Input Parameters:
<dojo.Color> color Required Colors can be denoted in the following formats:

  • R, G, B: new dojo.Color([255,0,0])
  • R,G,B,A. The "A" value represents transparency where 0.0 is fully transparent and 1.0 has no transparency: new dojo.Color([255,0,0,0.25])
  • Hex string: new dojo.Color("#C0C0C0")
  • Named string: new dojo.Color("blue")

toJson()

Converts object to its ArcGIS Server JSON representation.
Return value: Object