Why doesLocation.distanceBetween
throw an Exception with the following example:
Location.distanceBetween(51.5175431381974,-0.1501073187713473, 51.5173695544231, -0.15127676190184, results);
I checked same positioning here and the distance was reported as 0.08319 km and I'm not sure why it throws the Exception:
java.lang.IllegalArgumentException: results is null or has length < 1
your results variable needs to be initalized to an array of floats with length > 0. The spots in this array are filled with the result of the calculation.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With