简体   繁体   English

如何获得正常的谷歌地图蓝色当前位置标记?

[英]How can I get the normal Google Maps blue current location marker?

I know how i can get my current location and how to place a marker on given coordinates.我知道如何获取当前位置以及如何在给定坐标上放置标记。 What I am trying to figure out is how I can get that blue round current location marker that you get in your normal Google Maps app.我想弄清楚的是如何获得您在普通 Google 地图应用程序中获得的蓝色圆形当前位置标记。 Which moves as the device changes location fluently without any lag and shows you the direction you are facing.它会随着设备流畅地改变位置而移动,没有任何滞后,并向您显示您所面对的方向。 I will add an image to make it clearer.我将添加一个图像以使其更清晰。 I am guessing it also uses some sort of animation to show the changing location fluently.我猜它也使用某种动画来流畅地显示不断变化的位置。 I am working on AndroidStudio.我在 AndroidStudio 上工作。

在此处输入图片说明

mMap.setMyLocationEnabled(true);

帮我解决了这个问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何通过使用Google Maps获取用户当前位置并在android中放置标记 - How can i get the user current location and put marker on it in android by using google maps 如何在不使用谷歌地图和其他地图的情况下获取用户当前位置? - How can I get user current location without using google maps and other maps? 我怎样才能让它在谷歌地图上显示一个标记? - how can I get this to display a marker on google maps? 如何从 Google 地图中的可拖动标记中获取 position? - How can I get position from a draggable marker in Google Maps? Google 地图:当前位置标记(GMap 的期间更新) - Google Maps: Current Location Marker (Period updates for GMaps) 在 Google Maps v2 上计算当前位置和标记之间的距离 - Calculate Distance between Current Location and Marker on Google Maps v2 如何从Google Maps android中的当前位置不断检测附近的标记位置? - How to constantly detect nearby marker locations from current location in Google Maps android? 如何使用TabLayout在ViewPager中的Google Maps Fragment中获取当前位置 - How to get current location within a Google Maps Fragment in a ViewPager with TabLayout 如何在Android Google Maps API V2中获取当前位置? - How to get current location in android google maps api V2? 将标记当前位置拖到另一个位置时如何更新位置? - How can I update location when I drag marker current location to another location?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM