Esempio n. 1
0
 /**
  * Enables or disables fading of the compass when facing north.
  *
  * <p>By default this feature is enabled
  *
  * @param compassFadeFacingNorth True to enable the fading animation; false to disable it
  */
 public void setCompassFadeFacingNorth(boolean compassFadeFacingNorth) {
   compassSettings.setFadeFacingNorth(compassFadeFacingNorth);
   mapView.setCompassFadeFacingNorth(compassFadeFacingNorth);
 }
Esempio n. 2
0
 /**
  * Returns whether the compass performs a fading animation out when facing north.
  *
  * @return True if the compass will fade, false if it remains visible
  */
 public boolean isCompassFadeWhenFacingNorth() {
   return compassSettings.isFadeFacingNorth();
 }
Esempio n. 3
0
 /**
  * Returns whether the compass is enabled.
  *
  * @return True if the compass is enabled; false if the compass is disabled.
  */
 public boolean isCompassEnabled() {
   return compassSettings.isEnabled();
 }
Esempio n. 4
0
 /**
  * Sets the gravity of the compass view. Use this to change the corner of the map view that the
  * compass is displayed in. By default, the compass is in the top right corner.
  *
  * @param gravity One of the values from {@link Gravity}.
  * @see Gravity
  */
 @UiThread
 public void setCompassGravity(int gravity) {
   compassSettings.setGravity(gravity);
   mapView.setCompassGravity(gravity);
 }
Esempio n. 5
0
 /**
  * Returns the bottom side margin of CompassView
  *
  * @return The bottom margin in pixels
  */
 public int getCompassMarginBottom() {
   return compassSettings.getMargins()[3];
 }
Esempio n. 6
0
 /**
  * Enables or disables the compass. The compass is an icon on the map that indicates the direction
  * of north on the map. When a user clicks the compass, the camera orients itself to its default
  * orientation and fades away shortly after. If disabled, the compass will never be displayed. By
  * default, the compass is enabled.
  *
  * @param compassEnabled True to enable the compass; false to disable the compass.
  */
 public void setCompassEnabled(boolean compassEnabled) {
   compassSettings.setEnabled(compassEnabled);
   mapView.setCompassEnabled(compassEnabled);
 }
Esempio n. 7
0
 /**
  * Returns the right side margin of CompassView
  *
  * @return The right margin in pixels
  */
 public int getCompassMarginRight() {
   return compassSettings.getMargins()[2];
 }
Esempio n. 8
0
 /**
  * Returns the top side margin of CompassView
  *
  * @return The top margin in pixels
  */
 public int getCompassMarginTop() {
   return compassSettings.getMargins()[1];
 }
Esempio n. 9
0
 /**
  * Returns the left side margin of CompassView
  *
  * @return The left margin in pixels
  */
 public int getCompassMarginLeft() {
   return compassSettings.getMargins()[0];
 }
Esempio n. 10
0
 /**
  * Sets the margins of the compass view. Use this to change the distance of the compass from the
  * map view edge.
  *
  * @param left The left margin in pixels.
  * @param top The top margin in pixels.
  * @param right The right margin in pixels.
  * @param bottom The bottom margin in pixels.
  */
 @UiThread
 public void setCompassMargins(int left, int top, int right, int bottom) {
   compassSettings.setMargins(new int[] {left, top, right, bottom});
   mapView.setCompassMargins(left, top, right, bottom);
 }
Esempio n. 11
0
 /**
  * Returns the gravity value of the CompassView
  *
  * @return The gravity
  */
 public int getCompassGravity() {
   return compassSettings.getGravity();
 }