Geolocation.distance(); Not working


#1

When i try and run geolocation.distance(loc1, loc2) i get ERROR TypeError: Cannot read property 'android' of undefined. Both locations are valid from geolocation.getCurrentLocation({ desiredAccuracy: Accuracy.high, updateDistance: 0.1, maximumAge: 10000, timeout: 20000 }) so i dont see what is going wrong.

Am I missing anything?


#2

It looks like the location variables i was using weren’t populated by the time i called the function