I'm using Mapbox for Android Java and need to calculate the distance between a drawn line defined by start and endpoint to the users current location.
Any idea on how to implement that with mapbox?
You have some Turf.js (a geospatial analysis library) methods ported to Android: https://docs.mapbox.com/android/java/guides/turf/
TurfMisc.nearestPointOnLine()
with the line and the user location as an inputTurfMeasurement.distance()
between the two points