I am working on a project where we need to know the direction (compass) of the street. In fact, we only have GeoPoint (lat; long and header), we plan to use reverseGeocoding to indicate where it is (which street?); and then we would like to know if he is heading the wrong way.
Google Maps, OSM, Mapquest all of them display an arrow above the street, which indicates its direction. I think they draw them dynamically, so they need to know their angle. This is what I would like to know (if possible)
Thanks in advance!
#EDIT:
I think maybe they cut the street into small pieces, and then said: “This street track goes from (lat1; lng1) to (lat2; lng2),” which will give this track direction so that they can draw this arrow. Also, not every street is a straight line, so its direction is not only one, it depends on what part of the street you are on.
source
share