Select to view content in your preferred language

SimpleMarkerSymbol outline not rendering correctly on map

125
1
02-17-2025 11:44 AM
barrons_locus
New Contributor

I am working on creating a symbology editor but having an issue when adding SimpleMarkerSybmols to the map. It seems like the outline properties are not responding correctly when rendered on the map itself. The symbol in the LayerList is correct based on the symbol settings object I am providing, but the symbol on the map is completely different. Both examples below render the same (incorrect) symbol on the map, but the correct symbol on the LayerList even though they have a different width and type property. I have tried explicityl creating a SimpleLineSymbol with the outline property as well and setting it to that but I get the same issue. Does anyone know what could be going wrong or causing the outline to be rendered incorrectly on the map?

const renderer = new SimpleRenderer({
symbol: SimpleMarkerSymbol.fromJSON({
"color": [0,128,255,255],
"size": 13.5,
"angle": 0,
"xoffset": 0,
"yoffset": 0,
"type": "esriSMS",
"style": "esriSMSPath",
"outline": {
"color": [0,0,0,255],
"width": 3.5,
"type": "esriSLS",
"style": "esriSLSDash"
},
"path": svgPath
})
});

 

const renderer = new SimpleRenderer({
symbol: SimpleMarkerSymbol.fromJSON({
"color": [0,128,255,255],
"size": 13.5,
"angle": 0,
"xoffset": 0,
"yoffset": 0,
"type": "esriSMS",
"style": "esriSMSPath",
"outline": {
"color": [0,0,0,255],
"width": 2.25,
"type": "esriSLS",
"style": "esriSLSSolid"
},
"path": svgPath
})
});



 

0 Kudos
1 Reply
AnneFitz
Esri Regular Contributor

Hello - thanks for reporting this! It's actually a known limitation with our SimpleMarkerSymbol/SVG implementation not supporting outline styles. I will update the documentation to reflect this. 

As a workaround, you could convert the SVG to a CIMSymbol and then you should be able to add dashes to the outline. To do this, you could either use the CIM Symbol Builder or the convertToCIMSymbol method. Hope this helps!