Select to view content in your preferred language

VectorFieldRenderer color change

354
2
Jump to solution
09-06-2024 11:14 AM
kaander08
Emerging Contributor

Hi all, 

I am working with vector field data in ArcGIS Maps SDK for Javascript and I am wondering if you can change the color of the arrows. The documentation says that the styles are predefined so I am wondering if it is just not possible. Please see the below code. I put "color: "red" in everyplace I can think of but it does not seem to change the color.

 

kaander08_0-1725646378182.png

 

 

const rendererWind = new VectorFieldRenderer({
                type: "vector-field",
                color: "red",
                style: "single-arrow",
                flowRepresentation: "flow-from",
                symbolTileSize: 80,
                visualVariables: [{
                    type: "size",
                    maxSize: "50px",
                    minDataValue: 0,
                    minSize: "15px",
                    color: "red"
                },
                {
                    type: "rotation",
                    rotationType: "geographic"
                },
                {
                    type: "color",
                    color: "red"
                }]
            });

            const windLayer = new ImageryLayer({
                url: ***
                id: "windLayer",
                visible: false,
                minScale: [10000000],
                renderer: rendererWind                    
            });
1 Solution

Accepted Solutions
UndralBatsukh
Esri Regular Contributor

Hi there, 

It is not possible to change the color of the vector field renderer symbols at this time. We have plans to add support for this but I do not know when it will happen. 

View solution in original post

0 Kudos
2 Replies
UndralBatsukh
Esri Regular Contributor

Hi there, 

It is not possible to change the color of the vector field renderer symbols at this time. We have plans to add support for this but I do not know when it will happen. 

0 Kudos
kaander08
Emerging Contributor

Thank you for your reply. I am mapping ocean currents (m/s) and wind stress (N/m²), but the current setup doesn't allow me to adjust the minimum and maximum values on any of the predesigned displays, which forces me to use the single-arrow symbology, resulting in wind stress and ocean currents being displayed in the same color. The inability to differentiate between the two layers is problematic. Adding this functionality feels like a straightforward enhancement. I hope ESRI adds support for it soon.

0 Kudos