convertNestedLngLatToList function

List convertNestedLngLatToList(
  1. List nestedList
)

Implementation

List<dynamic> convertNestedLngLatToList(List<dynamic> nestedList) {
  if (nestedList.isEmpty) {
    return [];
  }
  return nestedList.map((element) {
    if (element is List) {
      return convertNestedLngLatToList(element);
    } else if (element is LngLat) {
      return element.toMap();
    }
    return element;
  }).toList();
}