BMFReverseGeoCodeSearchResult.fromMap constructor

BMFReverseGeoCodeSearchResult.fromMap(
  1. Map map
)

map => BMFReverseGeoCodeSearchResult

Implementation

BMFReverseGeoCodeSearchResult.fromMap(Map map)
    : assert(map != null,
          'Construct a BMFReverseGeoCodeSearchResult,The parameter map cannot be null !') {
  location =
      map['location'] == null ? null : BMFCoordinate.fromMap(map['location']);
  address = map['address'];
  businessCircle = map['businessCircle'];
  addressDetail = map['addressDetail'] == null
      ? null
      : BMFAddressComponent.fromMap(map['addressDetail']);
  confidence = map['confidence'];
  if (map['poiList'] != null) {
    poiList = new List<BMFPoiInfo>();
    map['poiList'].forEach((v) {
      poiList.add(BMFPoiInfo.fromMap(v as Map));
    });
  }
  if (map['poiRegions'] != null) {
    poiRegions = new List<BMFSearchRGCRegionInfo>();
    map['poiRegions'].forEach((v) {
      poiRegions.add(BMFSearchRGCRegionInfo.fromMap(v as Map));
    });
  }
  sematicDescription = map['sematicDescription'];
}