Hi-
Does anyone know the url(s) for picture fill symbols?
Thanks
David
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.
David,
do you mean this? Esri picture marker symbol generator for JavaScript developers | ArcGIS Blog
Tim
Thanks Tim-
No, I mean the picture fill symbols - colored hatching, mangrove etc
I think you are stuck with what is available here SimpleFillSymbol | API Reference | ArcGIS API for JavaScript
Sorry, little more info - the sample:
Add graphics to a map | ArcGIS API for JavaScript
contains:
// 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( "images/mangrove.png", new SimpleLineSymbol( SimpleLineSymbol.STYLE_SOLID, new Color('#000'), 1 ), 42, 42 );
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.
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.