BMFDrivingRouteLine.fromMap constructor

BMFDrivingRouteLine.fromMap(
  1. Map map
)

map => BMFDrivingRouteLine

Implementation

BMFDrivingRouteLine.fromMap(Map map) : super.fromMap(map) {
  if (map['steps'] != null) {
    steps = new List<BMFDrivingStep>();
    map['steps'].forEach((v) {
      steps.add(BMFDrivingStep.fromMap(v as Map));
    });
  }
  if (map['wayPoints'] != null) {
    wayPoints = new List<BMFPlanNode>();
    map['wayPoints'].forEach((v) {
      wayPoints.add(BMFPlanNode.fromMap(v as Map));
    });
  }
  lightNum = map['lightNum'];
  congestionMetres = map['congestionMetres'];
  taxiFares = map['taxiFares'];
}