Description
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.symbol.Symbol
|_esri.symbol.FillSymbol
Subclasses
SimpleFillSymbol PictureFillSymbol
Properties
| 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")
|
| outline | SimpleLineSymbol | Outline of the polygon. |
| type | String | The type of symbol. |
Methods
Property Details
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")
The type of symbol.
Known Values: simplemarkersymbol | picturemarkersymbol | simplelinesymbol | cartographiclinesymbol | simplefillsymbol | picturefillsymbol | textsymbol
Method Details
Sets the symbol color.
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")
|
Code Snippet:
require([
"dojo/_base/Color", ...
], function(Color, ... ) {
symbol.setColor(new Color([255,255,0,0.5]));
...
});
Sets the outline of the fill symbol.
Input Parameters:
Code Snippet:
require([
"esri/symbols/SimpleLineSymbol", "dojo/_base/Color", ...
], function(SimpleLineSymbol, Color, ... ) {
selSymbol.setOutline(new SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID, new Color([255,0,0]), 2));
...
});
Converts object to its ArcGIS Server JSON representation.
Return Value: Object