【发布时间】:2015-07-25 14:32:29
【问题描述】:
我正在创建一个使用地图控件的应用程序,我想根据用户的点击点获取地理位置,但我不知道如何获取它。 stackoverflow 中的其他问题中没有对我有用的解决方案。
我已经下载了 bing.maps 扩展,但我无法引用它。 Thete 是我正在使用的命名空间。
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices.WindowsRuntime;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Navigation;
using Windows.Devices.Geolocation;
using Windows.UI.Xaml.Shapes;
using Windows.UI.Xaml.Controls.Maps;
using Windows.UI;
using Windows.Phone;
using Windows.Storage.Streams;
我在互联网上搜索并在 MapControl 类中找到了一个方法。 (MapControl.GetLocationFromOffset)。它可以工作吗?以及如何使用它......我知道它存在,但我无法创建一个变量来存储这个值...... GeoLocator .. GeoPoint .. GeoCoordinate, var .. object ,这些都不适合我。
有人知道如何将点击的点转换为地理坐标(纬度和经度)吗?
【问题讨论】:
标签: c# .net xaml gps windows-store-apps