I need to show arrow in poly line. So i tired https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-LineSymbolMarker.html#dec...
I try using LineSymbolMarker, try to define symbol as
var simpleLineSymbol = {
type: "line-marker",
color: "orange", // orange
width: 1.5,
marker: { // autocasts from LineSymbolMarker
style: "arrow",
color: "blue",
placement: "begin"
}
};
But it showing plane black line instead of line with arrow and below error also coming:-
[esri.core.Accessor] Accessor#set Invalid property value, value needs to be one of 'esri.symbols.SimpleFillSymbol', 'esri.symbols.PictureFillSymbol', 'esri.symbols.PictureMarkerSymbol', 'esri.symbols.SimpleLineSymbol', 'esri.symbols.SimpleMarkerSymbol', 'esri.symbols.TextSymbol', 'esri.symbols.LabelSymbol3D', 'esri.symbols.LineSymbol3D', 'esri.symbols.MeshSymbol3D', 'esri.symbols.PointSymbol3D', 'esri.symbols.PolygonSymbol3D', 'esri.symbols.WebStyleSymbol', 'esri.symbols.CIMSymbol', or a plain object that can autocast (having .type = 'simple-fill', 'picture-fill', 'picture-marker', 'simple-line', 'simple-marker', 'text', 'label-3d', 'line-3d', 'mesh-3d', 'point-3d', 'polygon-3d', 'web-style', 'cim')
Please suggest what to do ?
Solved! Go to Solution.
Hello,
The type should be "simple-line" instead of "line-marker". Hope this helps!
Thanks it worked. But in manual it mentioned For LineSymbolMarker the type is always "line-marker". Might be some misinformation. Thanks for you help.
I am using https://js.arcgis.com/4.16/.
Hello,
The type should be "simple-line" instead of "line-marker". Hope this helps!
Thanks it worked. But in manual it mentioned For LineSymbolMarker the type is always "line-marker". Might be some misinformation. Thanks for you help.
No - that's true, the LineSymbolMarker is just being autocast on the SimpleLineSymbol.
var simpleLineSymbol = {
type: "simple-line",
color: "orange", // orange
width: 1.5,
marker: { // autocasts from LineSymbolMarker
type: "line-marker",
style: "arrow",
color: "blue",
placement: "begin"
}
};
You could add the type: "line-marker" on the marker property - but you don't have to since it is autocast. Hope this helps clear things up!