toJson method
Implementation
@override
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
void addIfPresent(String fieldName, dynamic value) {
if (value != null) {
json[fieldName] = value;
}
}
json["type"] = "geojson";
addIfPresent('data', data);
addIfPresent('maxzoom', maxzoom);
addIfPresent('attribution', attribution);
addIfPresent('buffer', buffer);
addIfPresent('tolerance', tolerance);
addIfPresent('cluster', cluster);
addIfPresent('clusterRadius', clusterRadius);
addIfPresent('clusterMaxZoom', clusterMaxZoom);
addIfPresent('clusterProperties', clusterProperties);
addIfPresent('lineMetrics', lineMetrics);
addIfPresent('generateId', generateId);
addIfPresent('promoteId', promoteId);
return json;
}