getDistanceToFeature

fun getDistanceToFeature(currentLocation: LngLatAlt, feature: Feature): PointAndDistance

Given a Feature and a location this will calculate the nearest distance to it

Return

The a PointAndDistance object which contains the distance between currentLocation and feature and the point to which the distance is measured.

Parameters

currentLocation

Current location as LngLatAlt

feature