开发者

android map refresh button/menu option?

开发者 https://www.devze.com 2023-04-09 14:09 出处:网络
May I know how to implement button or menu option to get immediate update of user location on mapview, somet开发者_如何学运维hing like refresh button? Thank you very much!You may implement android.loc

May I know how to implement button or menu option to get immediate update of user location on mapview, somet开发者_如何学运维hing like refresh button? Thank you very much!


You may implement android.location.LocationListener interface This will keep track of the User's Current Location.

On a click of mouse you may invoke last location from this Listener.

LocationManager locationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE); locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER,1l,100,locationListener);

0

精彩评论

暂无评论...
验证码 换一张
取 消