formatLatitude static method

String formatLatitude(
  1. num lat
)

Formats a latitude lat with the cardinal N (lat >= 0) or S (lat < 0, shown without the minus sign): 10°N, 10°S.

Implementation

static String formatLatitude(num lat) {
  return lat < 0 ? '${-lat}°S' : '${lat.abs()}°N';
}