toStringAs method
A string representation of this object, with an optional format
applied.
When format
is not given, then GeoJSON is used.
Use decimals
to set a number of decimals (not applied if no decimals).
Implementation
String toStringAs({
TextWriterFormat<FeatureContent> format = GeoJSON.feature,
int? decimals,
}) {
final encoder = format.encoder(decimals: decimals);
writeTo(encoder.writer);
return encoder.toText();
}