Ejemplo n.º 1
0
 @Override
 public void onRotate(float deltaAngle) {
   currentAngle += deltaAngle;
   if (System.currentTimeMillis() - deltaTime > timeLastSet) {
     timeLastSet = System.currentTimeMillis();
     mMapView.setMapOrientation(mMapView.getMapOrientation() + currentAngle);
   }
 }
Ejemplo n.º 2
0
  @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;
  }
Ejemplo n.º 3
0
 /** @see com.brantapps.polaris.api.Mappable#setBearing(float) */
 @Override
 public void setBearing(final float aBearing) {
   mapView.setMapOrientation(-aBearing);
 }