public void setRotation(float rotation) {
   this.rotation = rotation;
   if (marker != null) {
     marker.setRotation(rotation);
   }
   update();
 }
 @Override
 public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
   if (!checkReady()) {
     return;
   }
   float rotation = seekBar.getProgress();
   for (Marker marker : mMarkerRainbow) {
     marker.setRotation(rotation);
   }
 }
Example #3
0
 /**
  * Update position.
  *
  * @param yaw Float variable.
  * @param coord LatLng variable.
  */
 private void updatePosition(float yaw, LatLng coord) {
   droneMarker.setPosition(coord);
   droneMarker.setRotation(yaw);
   droneMarker.setVisible(true);
 }