fromMap static method
Implementation
static PointOfInterest fromMap(dynamic poiMap) {
final tags = List<String>.from(poiMap["tags"]);
final externalData = poiMap["external_data"];
return PointOfInterest(
id: poiMap["id"] as int,
name: poiMap["name"] as String,
description: poiMap["description"] as String,
address: poiMap["address"] as String,
imageURL: poiMap["image_url"] as String,
latitude: poiMap["latitude"] as double,
longitude: poiMap["longitude"] as double,
customerID: externalData != null
? externalData["customer_id"] as String?
: poiMap["customer_id"] as String? ,
levelID: externalData != null
? externalData["wemap_level_id"] as double?
: poiMap["wemap_level_id"] as double?,
tags: tags,
);
}