toLatLng method

List<LatLng> toLatLng()

Converts a list of lists of double values representing latitude and longitude into a list of LatLng objects.

Each inner list should contain two double values in the order longitude, latitude.

Returns a list of LatLng objects.

Implementation

List<LatLng> toLatLng() {
  return map((List<double> e) {
    double x = e[1]; // Latitude
    double y = e[0]; // Longitude
    return LatLng(x, y);
  }).toList();
}