333
This commit is contained in:
parent
be90a309dd
commit
b0d2592ddb
|
|
@ -61,8 +61,21 @@ namespace ZR.Common.Model
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonPropertyName("address")]
|
[JsonPropertyName("address")]
|
||||||
public string Address { get; set; }
|
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; }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 腾讯地图地理编码API响应
|
/// 腾讯地图地理编码API响应
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
||||||
|
|
@ -96,7 +96,7 @@ namespace ZR.Common
|
||||||
|
|
||||||
if (geocoderResponse?.Status == 0 && geocoderResponse.Result != null)
|
if (geocoderResponse?.Status == 0 && geocoderResponse.Result != null)
|
||||||
{
|
{
|
||||||
return geocoderResponse.Result.Address;
|
return geocoderResponse.Result.formattedAddresses?.standard_address ?? geocoderResponse.Result.Address;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user