Geometry.fromJson constructor

Geometry.fromJson(
  1. Map<String, dynamic> json
)

Converts a map in JSON format to its corresponding object.

Implementation

factory Geometry.fromJson(Map<String, dynamic> json) => Geometry(
      location: LatLng.fromJson(
              [json['location']['lat'], json['location']['lng']]) ??
          const LatLng(0, 0),
      viewport: Bounds.fromJson(json['viewport']),
    );