How to use a multilayered symbol in arcGIS API

387
1
05-07-2019 06:31 AM
SaraEL_MALKI
Occasional Contributor II

Hello guys,

I need to add a multi layered symbol for my lines using the arcGIS API for javaScript,

like in the picture in ARCMAP

I tried to search online but didn't find anything helpful, I don't want to do this on PORTAL but instead to use it in my code to show my query results, so I need to code a multi layered symbol, I tried working with Cartographic Line symbol and adding multiple ones for my layer but it didn't work,

var lineCL = new CartographicLineSymbol({
"color": [
255,
0,
0,
255
],
"width": 1.995,
"type": "esriCLS",
"style": "esriSLSShortDashDot",
"cap": "esriLCSButt",
"join": "esriLJSRound",
"miterLimit": 30
},{
"color": [
26,
26,
26,
255
],
"width": 2.58,
"type": "esriCLS",
"style": "esriSLSShortDashDot",
"cap": "esriLCSButt",
"join": "esriLJSRound",
"miterLimit": 30
});
renderer.symbol=lineCL;

PLEASE I am waiting for your help.

Robert Scheitlin, GISP

0 Kudos
1 Reply
RobertScheitlin__GISP
MVP Esteemed Contributor

There is no composite symbol support in the JS API so there is no way to do this without using two seperate layer and stacking them.

0 Kudos