LatLng.fromJson constructor

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

Creates a LatLng from a JSON map in the format {'coordinates': [longitude, latitude]}.

Implementation

LatLng.fromJson(Map<String, dynamic> json)
    : latitude = json['coordinates'][1] as double,
      longitude = json['coordinates'][0] as double;