日期:2014-05-17  浏览次数:21378 次

c# 怎么获取 平板电脑GPS数据
现在手里有一个lenovo miix2型号的平板,win8系统,现在想通过GPS定位获取相应的坐标信息,求大神帮助。

------解决方案--------------------
求撒分
------解决方案--------------------
引用:
Quote: 引用:



这个要在平板上装应用 然后时时发到电脑上。 或用Eclipse调试工具去取
win8.1求指教


应是这个了

http://msdn.microsoft.com/en-us/library/windows/desktop/bb760543(v=vs.85).aspx
------解决方案--------------------
我在用这种方式

Geolocator geoloc = new Geolocator();
            Geoposition position = await geoloc.GetGeopositionAsync();//h获得地理坐标
            HttpClient httpClient = new HttpClient();
            HttpResponseMessage httpResult = await httpClient.GetAsync(String.Format("http://maps.google.com/maps/api/geocode/xml?latlng={0},{1}&language=zh-CN&sensor=false", position.Coordinate.Latitude, position.Coordinate.Longitude));
            var resss = await httpResult.Content.ReadAsStringAsync();
            XmlDocument xml = new XmlDocument();
            xml.LoadXml(resss);
            var nr = xml.SelectNodes("GeocodeResponse").First();
            var v = nr.SelectNodes("result").OrderBy(d => 1).Skip(3).Take(1).ToList().First();
            var t = v.SelectNodes("formatted_address").First().InnerText;

------解决方案--------------------

GeoCoordinateWatcher  watcher;     
  private void StartButton_Click(object sender, RoutedEventArgs e)     
        {     
            if (watcher == null)     
            {     
                //GeoPositionAccurac