p1 = geometry.paths[0][0]; p2 = geometry.paths[0][1]; var rise = p2[1] - p1[1]; var run = p2[0] - p1[0]; angle = (180/Math.PI) * Math.atan2(run, rise);
Hi Guys,
I know this is super old, but I came across this post while looking for a similar solution, so sharing my eventual solution here. Ended up building a custom line symbol to handle this. It's on github here:
nickcam/DirectionalLineSymbol · GitHub
Might help some others stumbling across this in the near future.
Thanks,
Nick