HereLocation.fromJson constructor

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

Implementation

HereLocation.fromJson(Map<String, dynamic> json) {
  locationId = json['LocationId'];
  locationType = json['LocationType'];
  displayPosition = json['DisplayPosition'] != null ? GeoCoordinates.fromMap(json['DisplayPosition']) : null;
  if (json['NavigationPosition'] != null) {
    navigationPosition = [];
    json['NavigationPosition'].forEach((v) {
      navigationPosition!.add(GeoCoordinates.fromMap(v));
    });
  }
  mapView = json['MapView'] != null ? HereMapView.fromJson(json['MapView']) : null;
  address = json['Address'] != null ? HereAddress.fromMap(json['Address']) : null;
}