printLatLongs static method

void printLatLongs(
  1. Way way
)

A convenience method to print a list of lat/long pairs

Implementation

static void printLatLongs(Way way) {
  for (var latlongs in way.latLongs) {
    List<String> results = [];
    String result = "";
    for (var latlong in latlongs) {
      result += "const LatLong(${(latlong.latitude).toStringAsFixed(6)},${(latlong.longitude).toStringAsFixed(6)}),";
      if (result.length > 250) {
        results.add(result);
        result = "";
      }
    }
    if (result.isNotEmpty) results.add(result);
    for (var action in results) {
      print("  $action");
    }
  }
}