1

I am developing an application with OpenLayers and I need to calculate the angle between two segments or directions.

I thought about getting the azimuth of those segments and then calculate the difference but I cannot find any method that can perform this directly, something like ol/geom/LineString getInitialAzimuth() or similar.

I found this http://www.movable-type.co.uk/scripts/latlong.html that could be useful but I was expecting something simpler.

I am missing anything?

closed as off-topic by Jochen Schwarze, Fran Raga, PolyGeo May 17 at 10:38

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "When seeking help to debug/write/improve code always provide the desired behavior, a specific problem/error and the shortest code (as formatted text, not pictures) needed to reproduce it in the question body. Providing a clear problem statement and a code attempt helps others to help you." – Jochen Schwarze, Fran Raga, PolyGeo
If this question can be reworded to fit the rules in the help center, please edit the question.