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