/** * Enables the "snap to location" mode. * * @param showToast defines whether a toast message is displayed or not. */ public void enableSnapToLocation(boolean showToast) { if (!mSnapToLocation) { mSnapToLocation = true; mShowMyLocation = true; mTileMap.setClickable(false); if (showToast) { // mTileMap.showToastOnUiThread(mTileMap // .getString(R.string.snap_to_location_enabled)); } } }
/** * Disables the "snap to location" mode. * * @param showToast defines whether a toast message is displayed or not. */ public void disableSnapToLocation(boolean showToast) { mLocation = null; if (mSnapToLocation) { mSnapToLocation = false; mSnapToLocationView.setChecked(false); mTileMap.setClickable(true); if (showToast) { // mTileMap.showToastOnUiThread(mTileMap // .getString(R.string.snap_to_location_disabled)); } } }