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

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

Description

(Added at v1.0)
Fill symbols are used to draw polygon features on the graphics layer. Fills can be specified as solid, hatched, or pictures. In addition, the symbol can have an optional outline, which is defined by a line symbol.

FillSymbol has no constructor. Use SimpleFillSymbol or PictureFillSymbol.

Samples

Search for samples that use this class.

Class hierarchy

esri/symbols/Symbol
|_esri/symbols/FillSymbol

Subclasses

Properties

NameTypeSummary
colorColorSymbol color.
outlineSimpleLineSymbolOutline of the polygon.
typeStringThe type of symbol.

Methods

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

<Color> color

Symbol color.
Outline of the polygon.

<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]));
  ...
});

setOutline(outline)

Sets the outline of the fill symbol.
Return type: FillSymbol
Parameters:
<SimpleLineSymbol> outline Required Symbol used for outline.
Sample:
require([
  "esri/symbols/SimpleLineSymbol", "esri/Color", ... 
], function(SimpleLineSymbol, Color, ... ) {
  selSymbol.setOutline(new SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID, new Color([255,0,0]), 2));   
  ...
});

toJson()

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