Does anyone know the url(s) for picture fill symbols?
Take a look a this discussion that goes into why you can't apply a color to the different fill patterns.
The hatch patterns cannot be altered via the api because they are images.Only STYLE_SOLID will use the color provided. STYLE_SOLID and STYLE_NULL are the only "pure" esri/symbol/SimpleFillSymbol(s).All the other fill options like STYLE_BACKWARD_DIAGONAL, are actually esri/symbol/PictureFillSymbol(s), which use images that are included in the api http://js.arcgis.com/3.7/js/esri/images/symbol/sfs/vertical.png.The solution, work-around or what have you is to use esri/symbol/PictureFillSymbol with your own custom images.
No, I mean the picture fill symbols - colored hatching, mangrove etc
Sorry, little more info - the sample:
// fill symbol used for extent, polygon and freehand polygon, use a picture fill symbol // the images folder contains additional fill images, other options: sand.png, swamp.png or stiple.png
var fillSymbol = new PictureFillSymbol(
and since url is part of the constructor, I was wondering if "images/mangrove.png", is local or is that being pulled in from the full api or maybe from the rest api?
I see, that is a local png. What you would need is, get those png's and then host them locally.
Hmm, thanks that's what I thought too, but wasn't sure. Desktop accesses them from
C:\Program Files (x86)\ArcGIS\Desktop10.3\Styles\Pictures here as bmp's. Maybe a better question is:
How can I render the hatch or diagonal fill symbol lines when set as a simple fill symbol style? The fill symbol lines don't seem to be taking on the color set for the fill symbol, they remain black....
You mean the fills from the constant table here?
You can change the color of your mesh.
var sfs = new esri.symbol.SimpleFillSymbol(esri.symbol.SimpleFillSymbol.STYLE_SOLID, new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_DASHDOT, new esri.Color([255,0,0]), 2),new esri.Color([255,255,0,0.25]));
look at this example: the first color changes the outline color and the second color changes your mesh color.
Thanks Tim - That's exactly what I am doing here:
var newFirmSym = new SimpleFillSymbol(SimpleFillSymbol.STYLE_FORWARD_DIAGONAL, new SimpleLineSymbol(SimpleLineSymbol.STYLE_SOLID, new Color([0,25,255]), 3), new Color([255,255,0,0.5]));
but the FORWARD_DIAGONAL keeps rendering default black . . .
You are right, it doesn't work for me either.
Thanks, I thought I was going crazy. I was hoping to not have to render it in the mxd, but I may not have a choice....
Thanks Ken, I was looking for that discussion and couldn't find it. I would agree with your work around re the PictureFill, but it also looks like if you reference this js
that it overrides the default behavior.. either way thanks to you both for help-
Retrieving data ...