Best regards,
David
Thanks for Clarifying, David. Could you share a code snippet or live sample of your app?
We are using a MapView. I was also able to create a correct SimpleFillSymbol in a purely JS environment. We are, however, working on an Angular2 application, where the ESRI JS API is loaded as a bower dependency. I am not sure if this plays a role or not.
David,
Are you attempting this in a SceneView? If so, then you will see the behavior you're describing. Notice the note for known limitations in the documentation for the style property in SimpleFillSymbol - SimpleFillSymbol | API Reference | ArcGIS API for JavaScript 4.0
If working in a SceneView, then I recommend you use a FillSymbol3DLayer inside a PolygonSymbol3D although it still doesn't yet support styles other than a solid fill.
The working cross style in MapView - JS Bin - Collaborative JavaScript Debugging
But if you do the same in a SceneView - JS Bin - Collaborative JavaScript Debugging Then it doesn't work.
It seems to be working correctly with the Simple Fill sample. In the sandbox, if you make this change to the code, the polygons are symbolized with a diagonal cross hatching.
var defaultSym = new SimpleFillSymbol({ outline: { color: "red", width: 0.5 }, style: "diagonal-cross" });
this symbol will give you something like this
try this
symbol = new SimpleFillSymbol(SimpleFillSymbol.STYLE_NONE, new SimpleLineSymbol(SimpleLineSymbol.STYLE_DASHDOT, new Color([255,0,0]), 2), new Color([255,255,0,0.25]));
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.