AnsweredAssumed Answered

Can't display line graphics over my map

Question asked by skerdreux on Sep 11, 2018
Latest reply on Sep 11, 2018 by rscheitlin

Hello,

 

I try to display a very simple line graphic over a map but it displays anything and I've got no error under console browser.

I can see my map but no graphic over.

 

My code is simple : 

 

const lineSymbol = this.getLineSymbolFromUserInterfaceValue();
this.graphicLineSymbol = new Graphic({
geometry: this.linePreview,
symbol: lineSymbol,
});
this.graphicsLayerLineSymbol.add(this.graphicLineSymbol);

 

with : 

 

linePreview: {
paths: [[-111.30, 52.68], [-98, 49.5]],
spatialReference: {
wkid: 4326,
},
}

 

and 

 

getLineSymbolFromUserInterfaceValue() {
return {
color: Color.fromHex(this.colorPickerLineHexadecimalColorValue.innerHTML),
width: 2,
type: 'esriSLS',
style: 'esriSLSSolid',
};
}

 

 

any idea ?

Outcomes