AnsweredAssumed Answered

Finding the angle of a drawn line and snap a symbol with it

Question asked by johan_g on Aug 1, 2014
Latest reply on Aug 1, 2014 by johan_g

I am drawing a polyline on a map, and adding it to a graphics layer, I would like to snap a PictureMarkerSymbol at the edge of the polyline according to the angle of the line drawn. The picture below is an idea of the solution I want.

 

Snapping.png

 

Currently I am getting the angle of the first line draw, but the angle is not correctly aligned with the polyline. Is there a way of getting the angle of the line on which I am snapping the symbol in order to rotate that symbol to that angle,

 

I would really appreciate any help or advice given; since I am a beginner in arcGIS JavaScript and I am really stuck with this problem.

Outcomes