from static method
from method to get the OsrmGeometry from a dynamic value
Implementation
static OsrmGeometry from(dynamic geometry) {
switch (detect(geometry)) {
case OsrmGeometries.geojson:
return OsrmGeometry(
lineString: OsrmLineString.fromMap(geometry),
);
case OsrmGeometries.polyline:
return OsrmGeometry(
polyline: geometry,
);
case OsrmGeometries.polyline6:
return OsrmGeometry(
polyline6: geometry,
);
default:
return OsrmGeometry();
}
}