简体   繁体   中英

How to make the default Google Maps current location icon smoother

I've looked through a lot of documentation and questions asked here on stack overflow (for instance How to smoothly keep moving current location marker in Google Maps v2 android and Android Maps API v2 Change MyLocation Icon ) but haven't found any answer if it's possible to make the default current location icon (see attached image) moving smoother when tracking current location (while moving around). I have played around with how often the requestLocationUpdates should trigger (time and distance) but nothing will make it move nicer across the map.

I have no problem creating a marker and make that one smoother, but I don't know how to get hold of the blue icon. It doesn't seem to be a marker at all?

Is it possible to make it smoother, or do I have to set

googleMap.setMyLocationEnabled(false);

and implement my own current location marker?

当前位置图标

The Receiving Location Updates in the Android training documentation discusses using LocationListener to get interval updates. You set the LocationRequest and set its interval (either setFastestInterval or setInterval ) to get timely updates that you want. This can, however, affect battery consumption if your updates are too frequent.

Other raised issues similar to yours is like this ticket. Hoping you can get additional information for your case here.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM