NominatimResponse.fromJson constructor

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

Constructs a NominatimResponse instance from a JSON object.

Implementation

NominatimResponse.fromJson(Map<String, dynamic> json) {
  placeId = json['place_id'];
  licence = json['licence'];
  osmType = json['osm_type'];
  osmId = json['osm_id'];
  lat = json['lat'];
  lon = json['lon'];
  addressClass = json['class'];
  category = json['category'];
  type = json['type'];
  placeRank = json['place_rank'];
  importance = json['importance'];
  addresstype = json['addresstype'];
  name = json['name'];
  displayName = json['display_name'];
  address = json['address'] != null
      ? json['address'] as Map<String, dynamic>
      : null;
  extraTags = json['extratags'] != null
      ? json['extratags'] as Map<String, dynamic>
      : null;
  nameDetails = json['namedetails'] != null
      ? json['namedetails'] as Map<String, dynamic>
      : null;
  boundingbox = json['boundingbox'].cast<String>();
}