RealTimeLocationResult.fromMap constructor

RealTimeLocationResult.fromMap(
  1. Map map
)

Implementation

RealTimeLocationResult.fromMap(Map map)
    : assert(map != null),
      super.fromMap(map) {
  locType = LocType.values[map['locType'] as int];
  floor = map['floor'];
  indoor = map['indoor'];
  building = map['building'];
  latitude = map['latitude'];
  longitude = map['longitude'];
  if (map['coordType'] != null) {
    int value = map['coordType'] as int;
    if (value >= 0 && value <= 2) {
      coordType = CoordType.values[value];
    }
  }
  radius = map['radius'];
  direction = map['direction'];
  speed = map['speed'];
  altitude = map['altitude'];
  time = map['time'];
}