引用js<script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=百度申请的ak"></script>//html5获取经纬度 function GetLocation() { if (navigator.geolocation) { navigator.geolocation.getCurrentPosition(showPosition);…
调用百度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}&…