Hide Table of Contents
esri/dijit/util
esri/layer/pixelFilters
esri/process
esri/workers
Class: Symbol

require(["esri/symbols/Symbol"], function(Symbol) { /* code goes here */ });

Description

(Added at v1.0)
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:

Samples

Search for samples that use this class.

Subclasses

Properties

NameTypeSummary
colorColorSymbol color.
typeStringThe type of symbol.

Methods

NameReturn typeSummary
setColor(color)SymbolSets the symbol color.
toJson()ObjectConverts object to its ArcGIS Server JSON representation.
Property Details

<Color> color

Symbol color.

<String> type

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

setColor(color)

Sets the symbol color.
Return type: Symbol
Parameters:
<Color> color Required Symbol color.
Sample:
require([
  "esri/Color", ... 
], function(Color, ... ) {
  symbol.setColor(new Color([255,255,0,0.5]));
  ...
});

toJson()

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