public class MapboxMapOptions
extends java.lang.Object
implements android.os.Parcelable
Modifier and Type | Field and Description |
---|---|
static android.os.Parcelable.Creator<MapboxMapOptions> |
CREATOR |
Constructor and Description |
---|
MapboxMapOptions()
Creates a new MapboxMapOptions object.
|
Modifier and Type | Method and Description |
---|---|
MapboxMapOptions |
accessToken(java.lang.String accessToken)
Deprecated.
As of release 4.1.0, replaced by
MapboxAccountManager.start(Context, String) |
MapboxMapOptions |
apiBaseUrl(java.lang.String apiBaseUrl)
Specifies the URL used for API endpoint.
|
MapboxMapOptions |
attributionEnabled(boolean enabled)
Specifies the visibility state of a attribution for a map view.
|
MapboxMapOptions |
attributionGravity(int gravity)
Specifies the gravity state of attribution for a map view.
|
MapboxMapOptions |
attributionMargins(int[] margins)
Specifies the margin state of attribution for a map view
|
MapboxMapOptions |
attributionTintColor(int color)
Specifies the tint color of the attribution for a map view
|
MapboxMapOptions |
camera(CameraPosition cameraPosition)
Specifies a the initial camera position for the map view.
|
MapboxMapOptions |
compassEnabled(boolean enabled)
Specifies the visibility state of a compass for a map view.
|
MapboxMapOptions |
compassFadesWhenFacingNorth(boolean compassFadeWhenFacingNorth)
Specifies if the compass fades to invisible when facing north.
|
MapboxMapOptions |
compassGravity(int gravity)
Specifies the gravity state of compass for a map view.
|
MapboxMapOptions |
compassMargins(int[] margins)
Specifies the margin state of compass for a map view
|
static MapboxMapOptions |
createFromAttributes(android.content.Context context,
android.util.AttributeSet attrs)
Creates a MapboxMapsOptions from the attribute set.s
|
MapboxMapOptions |
debugActive(boolean enabled)
Specifies the used debug type for a map view.
|
int |
describeContents() |
boolean |
equals(java.lang.Object o) |
java.lang.String |
getAccessToken()
Deprecated.
|
java.lang.String |
getApiBaseUrl()
Get the current configured API endpoint base URL.
|
boolean |
getAttributionEnabled()
Get the current configured visibility state for attribution for a map view.
|
int |
getAttributionGravity()
Get the current configured gravity state for attribution for a map view.
|
int[] |
getAttributionMargins()
Get the current configured margins for attribution for a map view.
|
int |
getAttributionTintColor()
Get the current configured tint color for attribution for a map view.
|
static android.graphics.Bitmap |
getBitmapFromDrawable(android.graphics.drawable.Drawable drawable) |
CameraPosition |
getCamera()
Get the current configured initial camera position for a map view.
|
boolean |
getCompassEnabled()
Get the current configured visibility state for compass for a map view.
|
boolean |
getCompassFadeFacingNorth()
Get the current configured state for fading the compass when facing north.
|
int |
getCompassGravity()
Get the current configured gravity state for compass for a map view.
|
int[] |
getCompassMargins()
Get the current configured margins for compass for a map view.
|
boolean |
getDebugActive()
Get the current configured debug state for a map view.
|
boolean |
getLocationEnabled()
Get the current configured user location view state for a map view.
|
boolean |
getLogoEnabled()
Get the current configured visibility state for compass for a map view.
|
int |
getLogoGravity()
Get the current configured gravity state for logo for a map view.
|
int[] |
getLogoMargins()
Get the current configured margins for logo for a map view.
|
float |
getMaxZoom()
Get the current configured maximum zoom for a map view.
|
float |
getMinZoom()
Get the current configured min zoom for a map view.
|
int |
getMyLocationAccuracyAlpha()
Get the current configured MyLocationView accuracy circle alpha value.
|
int |
getMyLocationAccuracyTintColor()
Get the current configured MyLocationView accuracy circle color tint value.
|
android.graphics.drawable.Drawable |
getMyLocationBackgroundDrawable()
Get the current configured MyLocationView background drawable.
|
int[] |
getMyLocationBackgroundPadding()
Get the current configured MyLocationView background padding.
|
int |
getMyLocationBackgroundTintColor()
Get the current configured MyLocationView background tint color.
|
android.graphics.drawable.Drawable |
getMyLocationForegroundBearingDrawable()
Get the current configured MyLocationView foreground bearing drawable.
|
android.graphics.drawable.Drawable |
getMyLocationForegroundDrawable()
Get the current configured MyLocationView foreground drawable.
|
int |
getMyLocationForegroundTintColor()
Get the current configured MyLocationView foreground tint color.
|
boolean |
getRotateGesturesEnabled()
Get the current configured rotate gesture state for a map view.
|
boolean |
getScrollGesturesEnabled()
Get the current configured scroll gesture state for a map view.
|
java.lang.String |
getStyle()
Get the current configured style url for a map view.
|
boolean |
getTextureMode()
Deprecated.
As of the 4.2.0 release, using TextureView is deprecated.
|
boolean |
getTiltGesturesEnabled()
Get the current configured tilt gesture state for a map view.
|
boolean |
getZoomControlsEnabled()
Get the current configured zoom controls state for a map view.
|
boolean |
getZoomGesturesEnabled()
Get the current configured zoom gesture state for a map view.
|
int |
hashCode() |
MapboxMapOptions |
locationEnabled(boolean locationEnabled)
Specifies if the user location view is enabled for a map view.
|
MapboxMapOptions |
logoEnabled(boolean enabled)
Specifies the visibility state of a logo for a map view.
|
MapboxMapOptions |
logoGravity(int gravity)
Specifies the gravity state of logo for a map view.
|
MapboxMapOptions |
logoMargins(int[] margins)
Specifies the margin state of logo for a map view
|
MapboxMapOptions |
maxZoom(float maxZoom)
Specifies the used maximum zoom level for a map view.
|
MapboxMapOptions |
minZoom(float minZoom)
Specifies the used minimum zoom level for a map view.
|
MapboxMapOptions |
myLocationAccuracyAlpha(int alpha)
Set the MyLocationView accuracy alpha value.
|
MapboxMapOptions |
myLocationAccuracyTint(int myLocationAccuracyTintColor)
Set the MyLocationView accuracy circle tint color.
|
MapboxMapOptions |
myLocationBackgroundDrawable(android.graphics.drawable.Drawable myLocationBackgroundDrawable)
Set the background drawable of MyLocationView.
|
MapboxMapOptions |
myLocationBackgroundPadding(int[] myLocationBackgroundPadding)
Set the MyLocationView padding.
|
MapboxMapOptions |
myLocationBackgroundTintColor(int myLocationBackgroundTintColor)
Set the background tint color of MyLocationView.
|
MapboxMapOptions |
myLocationForegroundDrawable(android.graphics.drawable.Drawable myLocationForegroundDrawable)
Set the foreground drawable of the MyLocationView.
|
MapboxMapOptions |
myLocationForegroundDrawables(android.graphics.drawable.Drawable myLocationForegroundDrawable,
android.graphics.drawable.Drawable myLocationBearingDrawable)
Set the foreground drawables of the MyLocationView.
|
MapboxMapOptions |
myLocationForegroundTintColor(int myLocationForegroundTintColor)
Set the foreground tint color of MyLocationView.
|
MapboxMapOptions |
rotateGesturesEnabled(boolean enabled)
Specifies if the rotate gesture is enabled for a map view.
|
MapboxMapOptions |
scrollGesturesEnabled(boolean enabled)
Specifies if the scroll gesture is enabled for a map view.
|
MapboxMapOptions |
styleUrl(java.lang.String styleUrl)
Specifies the style url associated with a map view.
|
MapboxMapOptions |
textureMode(boolean textureMode)
Deprecated.
As of the 4.2.0 release, using TextureView is deprecated.
|
MapboxMapOptions |
tiltGesturesEnabled(boolean enabled)
Specifies if the tilt gesture is enabled for a map view.
|
void |
writeToParcel(android.os.Parcel dest,
int flags) |
MapboxMapOptions |
zoomControlsEnabled(boolean enabled)
Specifies if the zoom controls are enabled for a map view.
|
MapboxMapOptions |
zoomGesturesEnabled(boolean enabled)
Specifies if the zoom gesture is enabled for a map view.
|
public static final android.os.Parcelable.Creator<MapboxMapOptions> CREATOR
public MapboxMapOptions()
public static android.graphics.Bitmap getBitmapFromDrawable(android.graphics.drawable.Drawable drawable)
public static MapboxMapOptions createFromAttributes(android.content.Context context, android.util.AttributeSet attrs)
context
- Context related to a map view.attrs
- Attributeset containing configurationpublic MapboxMapOptions apiBaseUrl(java.lang.String apiBaseUrl)
apiBaseUrl
- The base of our API endpointpublic MapboxMapOptions camera(CameraPosition cameraPosition)
cameraPosition
- Inital camera position@Deprecated public MapboxMapOptions accessToken(java.lang.String accessToken)
MapboxAccountManager.start(Context, String)
DEPRECATED @see MapboxAccountManager#start(String)
Specifies the accesstoken associated with a map view.accessToken
- Token to be used to access the servicepublic MapboxMapOptions styleUrl(java.lang.String styleUrl)
styleUrl
- Url to be used to load a stylepublic MapboxMapOptions debugActive(boolean enabled)
enabled
- True is debug is enabledpublic MapboxMapOptions minZoom(float minZoom)
minZoom
- Zoom level to be usedpublic MapboxMapOptions maxZoom(float maxZoom)
maxZoom
- Zoom level to be usedpublic MapboxMapOptions compassEnabled(boolean enabled)
enabled
- True and compass is shownpublic MapboxMapOptions compassGravity(int gravity)
gravity
- see Gravity
public MapboxMapOptions compassMargins(int[] margins)
margins
- 4 long array for LTRB marginspublic MapboxMapOptions compassFadesWhenFacingNorth(boolean compassFadeWhenFacingNorth)
By default this value is true.
compassFadeWhenFacingNorth
- true is compass fades to invisblepublic MapboxMapOptions logoEnabled(boolean enabled)
enabled
- True and logo is shownpublic MapboxMapOptions logoGravity(int gravity)
gravity
- see Gravity
public MapboxMapOptions logoMargins(int[] margins)
margins
- 4 long array for LTRB marginspublic MapboxMapOptions attributionEnabled(boolean enabled)
enabled
- True and attribution is shownpublic MapboxMapOptions attributionGravity(int gravity)
gravity
- see Gravity
public MapboxMapOptions attributionMargins(int[] margins)
margins
- 4 long array for LTRB marginspublic MapboxMapOptions attributionTintColor(int color)
color
- integer resembling a colorpublic MapboxMapOptions rotateGesturesEnabled(boolean enabled)
enabled
- True and gesture will be enabledpublic MapboxMapOptions scrollGesturesEnabled(boolean enabled)
enabled
- True and gesture will be enabledpublic MapboxMapOptions tiltGesturesEnabled(boolean enabled)
enabled
- True and gesture will be enabledpublic MapboxMapOptions zoomControlsEnabled(boolean enabled)
enabled
- True and gesture will be enabledpublic MapboxMapOptions zoomGesturesEnabled(boolean enabled)
enabled
- True and gesture will be enabledpublic MapboxMapOptions locationEnabled(boolean locationEnabled)
locationEnabled
- True and gesture will be enabledpublic MapboxMapOptions myLocationForegroundDrawables(android.graphics.drawable.Drawable myLocationForegroundDrawable, android.graphics.drawable.Drawable myLocationBearingDrawable)
myLocationForegroundDrawable
- the drawable to show as foreground without bearingmyLocationBearingDrawable
- the drawable to show as foreground when bearing is disabledpublic MapboxMapOptions myLocationForegroundDrawable(android.graphics.drawable.Drawable myLocationForegroundDrawable)
The same drawable will be used for both bearing as non bearing modes.
myLocationForegroundDrawable
- the drawable to show as foregroundpublic MapboxMapOptions myLocationBackgroundDrawable(android.graphics.drawable.Drawable myLocationBackgroundDrawable)
Padding can be added to provide an offset to the background.
myLocationBackgroundDrawable
- the drawable to show as backgroundpublic MapboxMapOptions myLocationForegroundTintColor(int myLocationForegroundTintColor)
The color will tint both the foreground and the bearing foreground drawable.
myLocationForegroundTintColor
- the color to tint the foreground drawablepublic MapboxMapOptions myLocationBackgroundTintColor(int myLocationBackgroundTintColor)
myLocationBackgroundTintColor
- the color to tint the backgroundpublic MapboxMapOptions myLocationBackgroundPadding(int[] myLocationBackgroundPadding)
myLocationBackgroundPadding
- the color to tint the backgroundpublic MapboxMapOptions myLocationAccuracyTint(int myLocationAccuracyTintColor)
myLocationAccuracyTintColor
- the color to tint the accuracy circlepublic MapboxMapOptions myLocationAccuracyAlpha(int alpha)
alpha
- the alpha valuepublic MapboxMapOptions textureMode(boolean textureMode)
Since the 4.2.0 release we replaced our TextureView with an SurfaceView implemenation. Enabling this option will use the deprecated TextureView instead.
textureMode
- True to enable texture modepublic java.lang.String getApiBaseUrl()
public CameraPosition getCamera()
public float getMinZoom()
public float getMaxZoom()
public boolean getCompassEnabled()
public int getCompassGravity()
public int[] getCompassMargins()
public boolean getCompassFadeFacingNorth()
public boolean getLogoEnabled()
public int getLogoGravity()
public int[] getLogoMargins()
@Deprecated public java.lang.String getAccessToken()
DEPRECATED @see MapboxAccountManager#start(String)
Get the current configured access token for a map view.public java.lang.String getStyle()
public boolean getRotateGesturesEnabled()
public boolean getScrollGesturesEnabled()
public boolean getTiltGesturesEnabled()
public boolean getZoomControlsEnabled()
public boolean getZoomGesturesEnabled()
public boolean getAttributionEnabled()
public int getAttributionGravity()
public int[] getAttributionMargins()
public int getAttributionTintColor()
public boolean getLocationEnabled()
public android.graphics.drawable.Drawable getMyLocationForegroundDrawable()
public android.graphics.drawable.Drawable getMyLocationForegroundBearingDrawable()
public android.graphics.drawable.Drawable getMyLocationBackgroundDrawable()
public int getMyLocationForegroundTintColor()
public int getMyLocationBackgroundTintColor()
public int[] getMyLocationBackgroundPadding()
public int getMyLocationAccuracyTintColor()
public int getMyLocationAccuracyAlpha()
public boolean getDebugActive()
public boolean getTextureMode()
public int describeContents()
describeContents
in interface android.os.Parcelable
public void writeToParcel(android.os.Parcel dest, int flags)
writeToParcel
in interface android.os.Parcelable
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object