📅  最后修改于: 2022-03-11 14:59:07.098000             🧑  作者: Mango
//Bing is provide reverse geo coding, means you can get location from coordinates. You can fetch exact address or nearby list of POI or any type of entity.
//Firstly we will declare the class for parse JSON data.
public class Point
{
public string type { get; set; }
public List coordinates { get; set; }
}
public class Address
{
public string adminDistrict { get; set; }
public string adminDistrict2 { get; set; }
public string countryRegion { get; set; }
public string formattedAddress { get; set; }
public string locality { get; set; }
}
public class GeocodePoint
{
public string type { get; set; }
public List coordinates { get; set; }
public string calculationMethod { get; set; }
public List usageTypes { get; set; }
}
public class Resource
{
public string __type { get; set; }
public string isPrivateResidence { get; set; }
public List businessesAtLocation { get; set; }
}
public class ResourceSet
{
public int estimatedTotal { get; set; }
public List resources { get; set; }
}
public class RootObject
{
public string authenticationResultCode { get; set; }
public string brandLogoUri { get; set; }
public string copyright { get; set; }
public List resourceSets { get; set; }
public int statusCode { get; set; }
public string statusDescription { get; set; }
public string traceId { get; set; }
}
public class BusinessAddress
{
public double latitude { get; set; }
public double longitude { get; set; }
public string addressLine { get; set; }
public string locality { get; set; }
public string countryIso2 { get; set; }
public string formattedAddress { get; set; }
}
public class BusinessInfo
{
public string entityName { get; set; }
public string phone { get; set; }
public string type { get; set; }
}
public class BusinessesAtLocation
{
public BusinessInfo businessInfo { get; set; }
public BusinessAddress businessAddress { get; set; }
}
// For Complete tutoiral, visit NAYCode.com