toJson method
Converts current object to its JSON representation.
Implementation
Map<String, dynamic> toJson() {
final object = <String, dynamic>{
'type': 'Feature',
};
final i = id;
final p = properties;
final g = geometry;
if (g != null) {
object['geometry'] = g.toJson();
}
if (p != null) {
object['properties'] = p;
}
if (i != null) {
object['id'] = i;
}
return object;
}