using System.Collections.Generic; using System.Text.Json.Serialization; namespace ZR.Common.Model { /// /// 腾讯地图坐标对象 /// public class MapLocation { /// /// 纬度 /// [JsonPropertyName("lat")] public double Lat { get; set; } /// /// 经度 /// [JsonPropertyName("lng")] public double Lng { get; set; } } /// /// 腾讯地图API响应对象 /// public class MapApiResponse { /// /// 状态码 /// [JsonPropertyName("status")] public int Status { get; set; } /// /// 状态信息 /// [JsonPropertyName("message")] public string Message { get; set; } /// /// 请求ID /// [JsonPropertyName("request_id")] public string RequestId { get; set; } /// /// 坐标列表 /// [JsonPropertyName("locations")] public List Locations { get; set; } } /// /// 腾讯地图地理编码结果 /// public class MapGeocoderResult { /// /// 地址 /// [JsonPropertyName("address")] public string Address { get; set; } [JsonPropertyName("formatted_addresses")] public FormattedAddresses formattedAddresses { get; set; } } public class FormattedAddresses { public string recommend { get; set; } public string rough { get; set; } public string standard_address { get; set; } } /// /// 腾讯地图地理编码API响应 /// public class MapGeocoderApiResponse { /// /// 状态码 /// [JsonPropertyName("status")] public int Status { get; set; } /// /// 状态信息 /// [JsonPropertyName("message")] public string Message { get; set; } /// /// 请求ID /// [JsonPropertyName("request_id")] public string RequestId { get; set; } /// /// 地理编码结果 /// [JsonPropertyName("result")] public MapGeocoderResult Result { get; set; } } /// /// 坐标转换请求参数 /// public class CoordinateTranslateRequest { /// /// 坐标点,格式:lat,lng;lat,lng /// public string Locations { get; set; } /// /// 转换类型:1-GPS坐标转腾讯坐标 /// public int Type { get; set; } = 1; } /// /// 地理编码请求参数 /// public class GeocoderRequest { /// /// 坐标点,格式:lat,lng /// public string Location { get; set; } } }