I have a polygon graphic with SimpleFillSymbol, which has SimpleLineSymbol as outline with style set to 'none'.
According to api docs SimpleLineSymbol with style "none" means that line has no symbol. https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-SimpleLineSymbol.html#sty...
Despite that fill outline is still drawn like for a style 'solid'.
Codepen sample: https://codepen.io/mateusz-olsztyski/pen/NWOxrvE
Solved! Go to Solution.
Hi there,
This issue will be fixed at version 4.27. You can test the fix by pointing your codepen to our next version.
Hi there,
We will look into this issue. You can use set the outline to be null as shown below and it will work.
const fillSymbol = {
type: "simple-fill",
color: [227, 139, 79, 1],
outline: null
};
Thanks,
-Undral
This problem has existed since 4.22 and lies in the esri/symbols/cim/CIMSymbolHelper module, particularly in the fromSimpleFillSymbol function:
d.fromSimpleFillSymbol = function(a) {
const {color: c, style: b, outline: e} = a;
a = [];
const g = {
type: "CIMPolygonSymbol",
symbolLayers: a
};
var f = null;
if (e) {
const {cap: k, join: l, style: h} = e;
"solid" !== h && "none" !== h && "esriSLSSolid" !== h && "esriSLSNull" !== h && (f = [{
type: "CIMGeometricEffectDashes",
dashTemplate: R(h, k),
lineDashEnding: "NoConstraint",
scaleDash: !0,
offsetAlongLine: null
}]);
a.push({
type: "CIMSolidStroke",
color: u(e.color),
capStyle: P(k),
joinStyle: Q(l),
miterLimit: e.miterLimit,
width: e.width,
effects: f
})
}
//etc
};
The problem lies with line 9 of what's shown above; it should instead be something like:
if ((e) && (e.style != "none") && (e.style != "esriSLSNull")) {
Until this is fixed, the style "none" for SimpleFillSymbol outlines will be ignored. Another workaround, in addition to the one Undral mentioned, is to set your line symbol's opacity to zero (see line 7 below):
const fillSymbol = {
type: "simple-fill",
color: [227, 139, 79, 1],
outline: {
type: "simple-line",
style: "none",
color: [255,0,0,0],
width: 5
}
};
Hi there,
This issue will be fixed at version 4.27. You can test the fix by pointing your codepen to our next version.