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"] = "raster-dem";
addIfPresent('url', url);
addIfPresent('tiles', tiles);
addIfPresent('bounds', bounds);
addIfPresent('minzoom', minzoom);
addIfPresent('maxzoom', maxzoom);
addIfPresent('tileSize', tileSize);
addIfPresent('attribution', attribution);
addIfPresent('encoding', encoding);
return json;
}