GeographicArea.fromJson constructor
Implementation
factory GeographicArea.fromJson(final Map<String, dynamic> json) {
switch (json['type']) {
case 1:
return CircleGeographicArea.fromJson(json);
case 2:
return RectangleGeographicArea.fromJson(json);
case 3:
return PolygonGeographicArea.fromJson(json);
default:
return RectangleGeographicArea(
topLeft: Coordinates(),
bottomRight: Coordinates(),
);
}
}