latlong_formatter 2.0.1 copy "latlong_formatter: ^2.0.1" to clipboard
latlong_formatter: ^2.0.1 copied to clipboard

String formatting for Latitudes and Longitudes using templating.

example/latlong_formatter_example.dart

import 'package:latlong_formatter/latlong_formatter.dart';

void main() {
  LatLong ll = LatLong(5.346, -10.784);

  LatLongFormatter llf = LatLongFormatter(
      'Hi {info2},\n\nOn {utcyyyy-MM-dd} at {utcHH:mm} UTC, {info1} is at:\n\n{lat0d 0m.mmm c}, {lon0d 0m.mmm c}\n\nCheers\n{info}');
  print(llf.format(ll, info: ['Joe Blogs', 'SV Billy Do', 'Fred']));

  llf = LatLongFormatter('{latd\u00B0m"s\' c},{lond\u00B0m"s\' c}');
  print(llf.format(ll));

  llf = LatLongFormatter('{lat-d\u00B0m"s\'},{lon-d\u00B0m"s\'}');
  print(llf.format(ll));

  llf = LatLongFormatter('{lat+d\u00B0m"s\'},{lon+d\u00B0m"s\'}');
  print(llf.format(ll));
}
3
likes
150
points
180
downloads

Publisher

unverified uploader

Weekly Downloads

String formatting for Latitudes and Longitudes using templating.

Repository (GitHub)
View/report issues

Documentation

API reference

License

GPL-3.0 (license)

Dependencies

collection, format, intl

More

Packages that depend on latlong_formatter