map_inputs_model.dart 4 KB
class MapInputsModel {
  String? poiId; //Poi的id
  double? longitude; //获取该点经度   获取Poi的经纬度,如果不存在经纬度则为空
  double? latitude; //该点的纬度   获取Poi的经纬度,如果不存在经纬度则为空
  String? name; //返回提示名称
  String? district; //返回提示区域
  String? adcode; //返回提示区域编码
  String? typeCode; //获取输入提示结果的类型编码
  String? city; //获取输入提示结果的城市

  MapInputsModel(
      {this.poiId,
      this.longitude,
      this.latitude,
      this.name,
      this.district,
      this.adcode,
      this.typeCode,
      this.city});

  MapInputsModel.fromJson(Map<dynamic, dynamic> json) {
    poiId = json['poiId'];
    longitude = json['longitude'];
    latitude = json['latitude'];
    name = json['name'];
    district = json['district'];
    adcode = json['adcode'];
    typeCode = json['typeCode'];
    city = json['city'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();

    data['poiId'] = this.poiId;
    data['longitude'] = this.longitude;
    data['latitude'] = this.latitude;
    data['name'] = this.name;
    data['district'] = this.district;
    data['adcode'] = this.adcode;
    data['typeCode'] = this.typeCode;
    data['city'] = this.city;

    return data;
  }
}

class MapRoundSearchModel {
  String? businessArea; //POI的所在商圈。
  String? adName; //POI 的行政区划名称
  String? cityName; //POI的城市名称
  String? provinceName; //POI的省/ 自治区/ 直辖市/ 特别行政区名称
  String? typeDes; //POI 的类型描述
  String? tel; //POI的电话号码
  String? adCode; //POI 的行政区划代码
  String? poiId; //POI 的id,即其唯一标识
  String? title; //POI的名称
  String? snippet; //POI的地址
  double? longitude; //获取该点经度
  double? latitude; //获取该点纬度
  String? cityCode; //POI的城市编码
  String? provinceCode; //POI 的省/ 自治区/ 直辖市/ 特别行政区编码
  int? distance; //获取 POI 距离中心点的距离

  MapRoundSearchModel({
    this.businessArea, //POI的所在商圈。
    this.adName, //POI 的行政区划名称
    this.cityName, //POI的城市名称
    this.provinceName, //POI的省/ 自治区/ 直辖市/ 特别行政区名称
    this.typeDes, //POI 的类型描述
    this.tel, //POI的电话号码
    this.adCode, //POI 的行政区划代码
    this.poiId, //POI 的id,即其唯一标识
    this.title, //POI的名称
    this.snippet, //POI的地址
    this.longitude, //获取该点经度
    this.latitude, //获取该点纬度
    this.cityCode, //POI的城市编码
    this.provinceCode, //POI 的省/ 自治区/ 直辖市/ 特别行政区编码
    this.distance, //获取 POI 距离中心点的距离
  });

  MapRoundSearchModel.fromJson(Map<dynamic, dynamic> json) {
    businessArea = json['businessArea'];
    adName = json['adName'];
    cityName = json['cityName'];
    provinceName = json['provinceName'];
    typeDes = json['typeDes'];
    tel = json['tel'];
    adCode = json['adCode'];
    poiId = json['poiId'];
    title = json['title'];
    snippet = json['snippet'];
    longitude = json['longitude'];
    latitude = json['latitude'];
    cityCode = json['cityCode'];
    provinceCode = json['provinceCode'];
    distance = json['distance'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();

    data['businessArea'] = this.businessArea;
    data['adName'] = this.adName;
    data['cityName'] = this.cityName;
    data['provinceName'] = this.provinceName;
    data['typeDes'] = this.typeDes;
    data['tel'] = this.tel;
    data['adCode'] = this.adCode;
    data['poiId'] = this.poiId;
    data['title'] = this.title;
    data['snippet'] = this.snippet;
    data['longitude'] = this.longitude;
    data['latitude'] = this.latitude;
    data['cityCode'] = this.cityCode;
    data['provinceCode'] = this.provinceCode;
    data['distance'] = this.distance;

    return data;
  }
}