parseOuterPoints static method
Implementation
static List<LatLng> parseOuterPoints(List<dynamic> coordinates, String type) {
List<LatLng> points = [];
try {
if (type == 'Polygon') {
for (var point in coordinates) {
double lat = point[1] as double;
double lng = point[0] as double;
points.add(LatLng(lat, lng));
}
} else if (type == 'MultiPolygon') {
for (var point in coordinates[0]) {
double lat = point[1] as double;
double lng = point[0] as double;
points.add(LatLng(lat, lng));
}
}
} catch (e, s) {
_debugGeoJsonUtilsPrint("❌ error parseOuterPoints: $e");
_debugGeoJsonUtilsPrint("❌ trace: $s");
}
return points;
}