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);
精彩评论