I am developing an app to track vehicles. I get LatLng
data's from a device fitted on the vehicle. Then I plot the LatLng
's on map and draw Polyline
between them. That's working fine. I get the following output.
The problem is that I want to show the direction in which the vehicle traveled. I surfed through the Internet but couldn't find a solution. So please anyone guide me on how to draw arrow head in Polylines to show the direction. Thank you.
Arrow Mark over Polyline in Android Google Route Map
Also, since you probably get Location
from the GPS, and not LatLng
you can use Location.bearingTo
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.