Hi all, HELP.
I need / would like to change the symbology in particular the colour of a point from one layer basing it against its location to a point within another layer. For example if a point from layer A is within 10 metres of a point from layer B it turns green if its not then its red. i have Hex codes for the colours which i know can be used in Arcade so this is not an issue.
I'm not a coder but good at picking tricks up. Has anyone done this or similar before (sure someone has) if so could do with a little help. Also im new to Esri and GIs in recent months so this is a great learning curve
Many thanks in advanced.
The functionality available inside an Arcade expression depends on where is it applied (the profile so to speak). For a point from label A to know something about a point from layer B, requires access to another layer with functions like FeatureSetBy* and those are not available in the symbology profile. You can however create an additional field and calculate that field using an Arcade expression with access to the other layer.
I can imagine you would do something like this:
// create a buffer of 10m arround your point in layer A
var BufferA = BufferGeodetic($feature, 10, 'meters');
// Access your layer B
var LayerB = FeatureSetByName($datastore, "LayerB");
// Intersect the buffer A and layer B;
var IntersectAandB = Intersects(LayerB, BufferA);
// To speed this up with a single request you can nest the statements above:
var IntersectAandB = Intersects(FeatureSetByName($datastore, "LayerB"), BufferGeodetic($feature, 10, 'meters'));
// Check the number of features found
if (Count(InterectAandB) > 0) {
return "green";
} else {
return "red";
}
Thank you i will look into this further.