<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??碼云GVP開源項目 12k star Uniapp+ElementUI 功能強大 支持多語言、二開方便! 廣告
                微軟自帶的地圖很簡單 引用地圖`xmlns:Map="using:Windows.UI.Xaml.Controls.Maps"` 寫在`<Page>` 然后在`Grid` 用Map來得到MapControl `<Map:MapControl />` 運行 ![MapControl](https://box.kancloud.cn/2016-04-08_5707636a355fa.jpg "") 提示 警告:未指定MapServiceToken 在功能把位置選 ![這里寫圖片描述](https://box.kancloud.cn/2016-04-08_5707636a4907e.jpg "") 要獲得位置需要權限 ![獲得權限](https://box.kancloud.cn/2016-04-08_5707636a5bc66.jpg "") 寫一個按鈕點擊獲得位置 MainPage.xaml.cs ~~~ //需要using Windows.Devices.Geolocation; var access = await Windows.Devices.Geolocation.Geolocator.RequestAccessAsync(); switch (access) { case GeolocationAccessStatus.Unspecified: //定位未開啟提示是否跳轉到 設置 頁面 return; case GeolocationAccessStatus.Allowed: //允許獲取 break; case GeolocationAccessStatus.Denied: //不允許獲取位置信息時 給予提示 然后根據情況選擇是否跳轉到 設置 界面 await Windows.System.Launcher.LaunchUriAsync(new Uri("ms-settings://privacy/location")); return; default: break; } var gt = new Geolocator(); var position = await gt.GetGeopositionAsync(); //以前的position.Coordinate.Latitude 方法在UWP中已經過時,不再推薦使用 //var latiude = position.Coordinate.Latitude; map.Center = position.Coordinate.Point; map.ZoomLevel = 10; ~~~ 因為 map.Center說的是Geopoint,王陳染大神說的是position = await gt.GetGeopositionAsync();類型是Geoposition,結果錯誤是出現了 > 無法將類型“Windows.Devices.Geolocation.Geoposition”隱式轉換為“Windows.Devices.Geolocation.Geopoint” appButtonBar 正確的`map.Center = position.Coordinate.Point;` 點擊就把地圖中心設置在用戶位置 參考:[http://www.wangchenran.com](http://www.wangchenran.com)
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看