Whenever I try to set a style other than 'solid' on a SimpleFillSymbol, the geometry gets rendered empty, with only the outline being drawn. Is this a known issue? I couldn't find any similar posts on this forum.
Best regards,
David
The description says thath the property is not supported for 3D SceneViews: SimpleFillSymbol | API Reference | ArcGIS API for JavaScript 4.0
Oh sorry. Test the following on the Esri sample (Get started with graphics - 4.0 ) and it works:
polygonGraphic.symbol.style = "diagonal-cross"
We are using JSAPI 4.0 and developing in Typescript. We tried setting the value in the constructor, afterwards, with and without specifying color - the result is the same. Nothing is rendered unless the style is 'solid'.
How are you setting the style of the graphic? See SimpleFillSymbol | API Reference | ArcGIS API for JavaScript
So for example, this works:
var graphic = map.graphics.graphics[0]; // first graphic of map graphics list (assuming it is a polygon) graphic.symbol.setStyle(esri.symbol.SimpleFillSymbol.STYLE_HORIZONTAL); map.graphics.redraw();
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.