Android real-time Google Maps location tracking

≡放荡痞女 提交于 2019-12-01 07:35:01

问题


I am working on an Android app where players battle each on their phones in real-time based on their location. On Google maps, you can see where you are, in what direction you are facing, and where you are moving, all from a little blue dot. My question is: How can I integrate something like that in my app, so when the player moves, you can see it on the Google Maps fragment?

Edit: Currently, my application drops a new pin every time your location updates. I'm looking for something that moves the pin rather then adding a new one.


回答1:


I found a temporary solution! What I'm doing now is calling map.clear(), and then adding new markers to the places I need... I decided this was best because I am dynamically creating new ones, and not just working with an array, or single marker.



来源:https://stackoverflow.com/questions/39778805/android-real-time-google-maps-location-tracking

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!