as method
Converts the distance to the given LengthUnit
final int km = distance.as(LengthUnit.Kilometer,
new LatLng(52.518611,13.408056),new LatLng(51.519475,7.46694444));
Implementation
num as(final LengthUnit unit, final GeoLatLng p1, final GeoLatLng p2) {
final double dist = _calculator.distance(p1, p2).toDouble();
return _round(LengthUnit.Meter.to(unit, dist));
}