@Override public void onRotate(float deltaAngle) { currentAngle += deltaAngle; if (System.currentTimeMillis() - deltaTime > timeLastSet) { timeLastSet = System.currentTimeMillis(); mMapView.setMapOrientation(mMapView.getMapOrientation() + currentAngle); } }
@Override public boolean onOptionsItemSelected(MenuItem pItem, int pMenuIdOffset, MapView pMapView) { if (pItem.getItemId() == MENU_ENABLED + pMenuIdOffset) { if (this.isEnabled()) { mMapView.setMapOrientation(0); this.setEnabled(false); } else { this.setEnabled(true); return true; } } else if (pItem.getItemId() == MENU_ROTATE_CCW + pMenuIdOffset) { mMapView.setMapOrientation(mMapView.getMapOrientation() - 10); } else if (pItem.getItemId() == MENU_ROTATE_CW + pMenuIdOffset) { mMapView.setMapOrientation(mMapView.getMapOrientation() + 10); } return false; }
/** @see com.brantapps.polaris.api.Mappable#setBearing(float) */ @Override public void setBearing(final float aBearing) { mapView.setMapOrientation(-aBearing); }