Hi. A little newer to ArcGIS. I'm trying to render a simple marker via a feature layer renderer but pass a dynamic angle value. We have a number of different markers based on certain field values so we're using the `unique-value` type.
Layer looks like this:
layerRef.current = new FeatureLayer({
title : stuff..
id : stuff..
source : graphics
objectIdField : stuff..
outFields : stuff..
fields : stuff..
renderer : getHistoryByAssetRenderer(),
popupTemplate : stuff..
});
Here's a dumb version of the array of the source objects:
const graphics = [
{
eventType : 'direction',
angle : 67
},
{
eventType : 'turning'
angle. : 234
}
]then the renderer looks like so:
const getHistoryByAssetRenderer = () => ({
type : 'unique-value',
field : 'eventType',
uniqueValueInfos : [
...,
{
value : 'direction',
symbol : {
type : 'simple-marker',
style : 'path',
path : EVENT_TRIANGLE_PATH,
angle : HOW DO I GET PASS THE ANGLE HERE???
size. : 10
color : fillColor,
outline : {
color : outlineColor,
width
}
}
]
})
So of course the renderer handles finding the `eventType` field and rendering the marker based on the that field, but i'm not sure how to pass the angle to the symbol so the marker can be rotated.
Some notes on what I've tried:
Not sure if there is a way to use Roatation but it seems to balk when the renderer type is `unique-value`
Similar question:
https://community.esri.com/t5/arcgis-appstudio-questions/how-to-rotate-renderer-icon-graphic-dynamically/m-p/866574/highlight/true#M3172