getNearestRoad

fun getNearestRoad(currentLocation: LngLatAlt, searchTree: FeatureTree): Feature?

Get nearest road from roads Feature Collection. WARNING: It doesn't care which direction the road is. Roads can contain crossings which are Points not LineStrings.

Return

A Feature that is the nearest road.

Parameters

currentLocation

Location of device.

searchTree

The FeatureTree to search for the nearest road.