PoiItem.fromJson constructor
PoiItem.fromJson(
- Map<String, dynamic> json
)
Implementation
PoiItem.fromJson(Map<String, dynamic> json) {
adCode = json['adCode'];
adName = json['adName'];
businessArea = json['businessArea'];
cityCode = json['cityCode'];
cityName = json['cityName'];
direction = json['direction'];
distance = json['distance'];
email = json['email'];
indoorData = json['indoorData'] != null ? IndoorData.fromJson(json['indoorData']) : null;
isIndoorMap = json['isIndoorMap'];
latLonPoint = json['latLonPoint'] != null ? LatLng.fromJson(json['latLonPoint']) : null;
enter = json['enter'] != null ? LatLng.fromJson(json['enter']) : null;
exit = json['exit'] != null ? LatLng.fromJson(json['exit']) : null;
parkingType = json['parkingType'];
if (json['photos'] != null) {
photos = [];
json['photos'].forEach((v) {
photos?.add(Photo.fromJson(v));
});
}
poiExtension = json['poiExtension'] != null ? PoiExtension.fromJson(json['poiExtension']) : null;
poiId = json['poiId'];
postcode = json['postcode'];
provinceCode = json['provinceCode'];
provinceName = json['provinceName'];
shopID = json['shopID'];
snippet = json['snippet'];
if (json['subPois'] != null) {
subPois = [];
json['subPois'].forEach((v) {
subPois?.add(SubPoiItem.fromJson(v));
});
}
tel = json['tel'];
title = json['title'];
typeCode = json['typeCode'];
typeDes = json['typeDes'];
website = json['website'];
gridCode = json['gridCode'] ?? "";
}