using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Windows.Devices.Geolocation;//引用此命名空间 namespace SimpleWeather { public class LocationManager { public async static Task< Geoposi…
先在Package.appxmanifest中配置位置权限 2. 创建LocationManager类 using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Windows.Devices.Geolocation; namespace Weather { public class LocationManage…