Unresolved reference: distanceTo

We are facing problem in using distanceTo() Method. We are getting the “unresolved reference: distanceTo” error.

Please see the code snippet.
internal var coffeeMachine = LocationPosition(3.1, 7.2)
override fun onPositionUpdate(locationPosition: LocationPosition) {
if(locationPosition.distanceTo(coffeeMachine) < 5)
}

How we can calculate the distance between the current user position and another position using Kotlin?. Please help us to resolve this issue.

Hi there, did you find out wheres the reference method?