I have created one query layer map by consuming featurelayerserver service URL in JavaScript API 4.10. Where I have some poly lines and I have added the graphics to display the lines in green color.And now I need to give a border in black color to that yellow line. Can anyone help me by giving the direction how to achieve that in JavaScript API 4.10 query graphics layer. My sample code is as below -
queryTask.execute(querygreen).then(function(result) {
//console.log(result.features.length)
result.features.forEach(function(item) {
var green = new Graphic({
geometry: item.geometry,
attributes: item.attributes,
symbol: {
type: "simple-line",
color: "#417505",
width: 2
}
});
view.graphics.add(green);
});
// Zoom to the features
view.goTo({
target: view.graphics
});
});
Can anyone please help me ..
Perhaps Outline is what you're looking for?
https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-SimpleFillSymbol.html
Paste a mock up of what you want to achieve.
In version 3.X of the API you could specify the outline colour seperately from the inner colour, but I the 4.X LineSymbol does not have that property. You might need to add an additional black line graphic for each feature with an bigger width before adding the yellow line graphic.