<tfoot id='eRbTd'></tfoot>
    <bdo id='eRbTd'></bdo><ul id='eRbTd'></ul>

      <i id='eRbTd'><tr id='eRbTd'><dt id='eRbTd'><q id='eRbTd'><span id='eRbTd'><b id='eRbTd'><form id='eRbTd'><ins id='eRbTd'></ins><ul id='eRbTd'></ul><sub id='eRbTd'></sub></form><legend id='eRbTd'></legend><bdo id='eRbTd'><pre id='eRbTd'><center id='eRbTd'></center></pre></bdo></b><th id='eRbTd'></th></span></q></dt></tr></i><div id='eRbTd'><tfoot id='eRbTd'></tfoot><dl id='eRbTd'><fieldset id='eRbTd'></fieldset></dl></div>

      <small id='eRbTd'></small><noframes id='eRbTd'>

        <legend id='eRbTd'><style id='eRbTd'><dir id='eRbTd'><q id='eRbTd'></q></dir></style></legend>

      1. 如何在 Google Maps for Android API v2 上显示我的位置

        时间:2023-09-02

          <tbody id='YsP6K'></tbody>

            <tfoot id='YsP6K'></tfoot>

            1. <i id='YsP6K'><tr id='YsP6K'><dt id='YsP6K'><q id='YsP6K'><span id='YsP6K'><b id='YsP6K'><form id='YsP6K'><ins id='YsP6K'></ins><ul id='YsP6K'></ul><sub id='YsP6K'></sub></form><legend id='YsP6K'></legend><bdo id='YsP6K'><pre id='YsP6K'><center id='YsP6K'></center></pre></bdo></b><th id='YsP6K'></th></span></q></dt></tr></i><div id='YsP6K'><tfoot id='YsP6K'></tfoot><dl id='YsP6K'><fieldset id='YsP6K'></fieldset></dl></div>

                  <bdo id='YsP6K'></bdo><ul id='YsP6K'></ul>

                  <small id='YsP6K'></small><noframes id='YsP6K'>

                • <legend id='YsP6K'><style id='YsP6K'><dir id='YsP6K'><q id='YsP6K'></q></dir></style></legend>
                  本文介绍了如何在 Google Maps for Android API v2 上显示我的位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  我一直在寻找答案,但在任何论坛问题中都没有人能够提供帮助.我已经搜索了教程.API 指南 说:

                  I've looked high and low for an answer on this, and no one, in any forum question has been able to help. I've searched through the tutorials. The API Guide says:

                  我的位置"按钮出现在屏幕的右上角仅当启用我的位置"图层时.

                  The My Location button appears in the top right corner of the screen only when the My Location layer is enabled.

                  所以我一直在寻找这个我的位置"图层,但找不到任何东西.如何在 Google 地图上显示我的位置?

                  So I've been looking for this My Location layer and have been unable to find anything. How do I show my location on a Google Map?

                  推荐答案

                  API 指南完全错了(真的是 Google?).使用 Maps API v2,您无需启用图层来显示自己,只需调用您使用地图创建的 GoogleMaps 实例即可.

                  The API Guide has it all wrong (really Google?). With Maps API v2 you do not need to enable a layer to show yourself, there is a simple call to the GoogleMaps instance you created with your map.

                  Google 文档

                  Google 提供的实际文档可以为您提供答案.你只需要

                  The actual documentation that Google provides gives you your answer. You just need to

                  // map is a GoogleMap object
                  map.isMyLocationEnabled = true
                  


                  // map is a GoogleMap object
                  map.setMyLocationEnabled(true);
                  

                  并观看奇迹发生.

                  只需确保您拥有位置权限,并且在 API 级别在运行时请求它23(男)或以上

                  Just make sure that you have location permission and requested it at runtime on API Level 23 (M) or above

                  这篇关于如何在 Google Maps for Android API v2 上显示我的位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:如何在自定义地图 iphone 和 android 上进行地理定位 下一篇:iOS 8 requestWhenInUseAuthorization 没有弹出

                  相关文章

                  最新文章

                  <i id='jgxpu'><tr id='jgxpu'><dt id='jgxpu'><q id='jgxpu'><span id='jgxpu'><b id='jgxpu'><form id='jgxpu'><ins id='jgxpu'></ins><ul id='jgxpu'></ul><sub id='jgxpu'></sub></form><legend id='jgxpu'></legend><bdo id='jgxpu'><pre id='jgxpu'><center id='jgxpu'></center></pre></bdo></b><th id='jgxpu'></th></span></q></dt></tr></i><div id='jgxpu'><tfoot id='jgxpu'></tfoot><dl id='jgxpu'><fieldset id='jgxpu'></fieldset></dl></div>

                  <small id='jgxpu'></small><noframes id='jgxpu'>

                  <tfoot id='jgxpu'></tfoot>

                  1. <legend id='jgxpu'><style id='jgxpu'><dir id='jgxpu'><q id='jgxpu'></q></dir></style></legend>

                        <bdo id='jgxpu'></bdo><ul id='jgxpu'></ul>