fromMap static method
Implementation
static ELocation fromMap(Map<String, dynamic> map) {
ELocation eLocation = ELocation();
eLocation.type = map['type'];
eLocation.typeX = map['typeX'];
eLocation.placeAddress = map['placeAddress'] as String?;
eLocation.latitude = map['latitude'];
eLocation.longitude = map['longitude'];
eLocation.eLoc = map['eLoc'] as String?;
if (map.containsKey('entryLatitude')) {
eLocation.entryLatitude = (map['entryLatitude'])?.toDouble();
}
if (map.containsKey('entryLongitude')) {
eLocation.entryLongitude = (map['entryLongitude'])?.toDouble();
}
eLocation.placeName = map['placeName'];
eLocation.alternateName = map['alternateName'];
eLocation.userName = map['user'];
if (map.containsKey('keywords')) {
List<dynamic> keywords = map['keywords'] as List<dynamic>;
eLocation.keywords = List.generate(keywords.length, (index) {
return keywords[index] as String;
});
}
if (map.containsKey('addressTokens')) {
eLocation.addressTokens = AddressToken.fromMap(map['addressTokens']);
}
eLocation.p = map['p'];
eLocation.orderIndex = map['orderIndex'];
eLocation.distance = (map['distance'])?.toDouble();
return eLocation;
}