调用百度api,根据经度和纬度获取地理位置信息,返回Json. C#代码: using Newtonsoft.Json; using Newtonsoft.Json.Linq; using System; using System.Net.Http; public class LocationService { //百度api private static string url = @"http://api.map.baidu.com/geocoder/v2/?location={0}&
百度接口相关说明:http://developer.baidu.com/map/ip-location-api.htm 返回是json格式,首先构建相关反系列化类: #region AddressForQueryIPFromBaidu [Serializable] public class AddressForQueryIPFromBaidu { public string Address { get; set; } public Content Content { get; set; } pu