IALocation.fromMap constructor

IALocation.fromMap(
  1. Map map
)

Implementation

IALocation.fromMap(Map map)
    : accuracy = map['accuracy'],
      heading = map['heading'],
      altitude = map['altitude'],
      floor = map['flr'],
      floorCertainty = map['floorCertainty'],
      velocity = map['velocity'],
      timestamp = DateTime.fromMillisecondsSinceEpoch(map['timestamp']),
      super(map['latitude'], map['longitude']) {
  if (map.containsKey('region')) {
    this.floorplan = Region.fromMap(map['region']).floorplan;
  }
  if (map.containsKey('pix_x') && map.containsKey('pix_y')) {
    this.pixel = IAPoint(map['pix_x'], map['pix_y']);
  }
}