2

How would I write an expression in the expression builder to rotate a marker symbol towards a fixed grid reference using Arcade and ArcGIS Pro?

It does not need to be too accurate (no haversine required) as the points are within 2km and it is a projected coordinate system (ESPG 27700, OSGB)

0

1 Answer 1

2

For those wanting looking for an expression builder reference there isn't one, what you need is the language reference: https://developers.arcgis.com/arcade/function-reference/. This doesn't give the whole story away as you have to click through the links to discover that you can call geometry($feature).x and geometry($feature).y.

The following works for me, with an arithmetic alignment and a marker that points to 0 degrees (arithmetically):

var pX = geometry($feature).x;
var pY = geometry($feature).y;
var cX = 572730.054736;
var cY = 161931.381529;
var dX = cX-pX;
var dY = cY-pY;
return Atan2(dY,dX)*(180/pi)+90;

Where cX and cY are the coordinates that I want the marker to point towards.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.