public final class CompassView extends AppCompatImageView implements java.lang.Runnable, FocalPointChangeListener
You can change the behaviour of this View during initialisation with
MapboxMapOptions, and xml attributes. While running you can
use UiSettings.
| Constructor and Description |
|---|
CompassView(android.content.Context context) |
CompassView(android.content.Context context,
android.util.AttributeSet attrs) |
CompassView(android.content.Context context,
android.util.AttributeSet attrs,
int defStyleAttr) |
| Modifier and Type | Method and Description |
|---|---|
void |
fadeCompassViewFacingNorth(boolean compassFadeFacingNorth) |
boolean |
isFacingNorth() |
boolean |
isFadeCompassViewFacingNorth() |
boolean |
isHidden() |
void |
onFocalPointChanged(android.graphics.PointF pointF) |
void |
run() |
void |
setEnabled(boolean enabled) |
void |
setMapboxMap(MapboxMap mapboxMap) |
void |
update(double bearing)
Updates the direction of the compass.
|
public CompassView(android.content.Context context)
public CompassView(android.content.Context context,
android.util.AttributeSet attrs)
public CompassView(android.content.Context context,
android.util.AttributeSet attrs,
int defStyleAttr)
public void setMapboxMap(MapboxMap mapboxMap)
public boolean isHidden()
public boolean isFacingNorth()
public void setEnabled(boolean enabled)
public void update(double bearing)
bearing - the direction value of the mappublic void fadeCompassViewFacingNorth(boolean compassFadeFacingNorth)
public boolean isFadeCompassViewFacingNorth()
public void run()
run in interface java.lang.Runnablepublic void onFocalPointChanged(android.graphics.PointF pointF)
onFocalPointChanged in interface FocalPointChangeListener