toJson method

Map<String, dynamic> toJson()

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

Implementation

Map<String, dynamic> toJson() => {
      'coordinates': [longitude, latitude]
    };