public static class LocationComponentOptions.Builder
extends java.lang.Object
LocationComponentOptions
.Modifier and Type | Method and Description |
---|---|
LocationComponentOptions.Builder |
accuracyAlpha(float accuracyAlpha)
Set the opacity of the accuracy view to a value from 0 to 1, where 0 means the accuracy view
is completely transparent and 1 means the view is completely opaque.
|
LocationComponentOptions.Builder |
accuracyColor(int accuracyColor)
Solid color to use as the accuracy view color property.
|
LocationComponentOptions.Builder |
backgroundDrawable(int backgroundDrawable)
Defines the drawable used for the background state icon.
|
LocationComponentOptions.Builder |
backgroundDrawableStale(int backgroundDrawableStale)
Defines the drawable used for the stale background icon.
|
LocationComponentOptions.Builder |
backgroundName(java.lang.String backgroundName)
Given a String image name, identical to one used in
the first parameter of
DingiMap.addImage(String, Bitmap) , the
component, will used this image in place of the provided or default dingi_backgroundDrawable. |
LocationComponentOptions.Builder |
backgroundStaleName(java.lang.String backgroundStaleName)
Given a String image name, identical to one used in
the first parameter of
DingiMap.addImage(String, Bitmap) , the
component, will used this image in place of the provided or default dingi_backgroundDrawableStale. |
LocationComponentOptions.Builder |
backgroundStaleTintColor(java.lang.Integer backgroundStaleTintColor)
Defines the background stale color as an integer.
|
LocationComponentOptions.Builder |
backgroundTintColor(java.lang.Integer backgroundTintColor)
Defines the background color as an integer.
|
LocationComponentOptions.Builder |
bearingDrawable(int bearingDrawable)
Defines the drawable used for the bearing icon.
|
LocationComponentOptions.Builder |
bearingName(java.lang.String bearingName)
Given a String image name, identical to one used in
the first parameter of
DingiMap.addImage(String, Bitmap) , the
component, will used this image in place of the provided or default dingi_bearingDrawable. |
LocationComponentOptions.Builder |
bearingTintColor(java.lang.Integer bearingTintColor)
Defines the bearing icon color as an integer.
|
LocationComponentOptions |
build()
Build a new instance of this
LocationComponentOptions class. |
LocationComponentOptions.Builder |
elevation(float elevation)
Sets the base elevation of this view, in pixels.
|
LocationComponentOptions.Builder |
enableStaleState(boolean enabled)
Enable or disable to stale state mode.
|
LocationComponentOptions.Builder |
foregroundDrawable(int foregroundDrawable)
Supply a Drawable that is to be rendered on top of all of the content in the Location Component layer stack.
|
LocationComponentOptions.Builder |
foregroundDrawableStale(int foregroundDrawableStale)
Defines the drawable used for the stale foreground icon.
|
LocationComponentOptions.Builder |
foregroundName(java.lang.String foregroundName)
Given a String image name, identical to one used in
the first parameter of
DingiMap.addImage(String, Bitmap) , the
component, will used this image in place of the provided or default dingi_foregroundDrawable. |
LocationComponentOptions.Builder |
foregroundStaleName(java.lang.String foregroundStaleName)
Given a String image name, identical to one used in
the first parameter of
DingiMap.addImage(String, Bitmap) , the
component, will used this image in place of the provided or default dingi_foregroundDrawableStale. |
LocationComponentOptions.Builder |
foregroundStaleTintColor(java.lang.Integer foregroundStaleTintColor)
Defines the foreground stale color as an integer.
|
LocationComponentOptions.Builder |
foregroundTintColor(java.lang.Integer foregroundTintColor)
Defines the foreground color as an integer.
|
LocationComponentOptions.Builder |
gpsDrawable(int gpsDrawable)
Defines the drawable used for the navigation state icon.
|
LocationComponentOptions.Builder |
gpsName(java.lang.String gpsName)
Given a String image name, identical to one used in
the first parameter of
DingiMap.addImage(String, Bitmap) , the
component, will used this image in place of the provided or default dingi_gpsDrawable. |
LocationComponentOptions.Builder |
layerBelow(java.lang.String layerBelow)
Sets the layer id to set the location component below to.
|
LocationComponentOptions.Builder |
maxZoom(double maxZoom)
Sets the maximum zoom level the map can be displayed at.
|
LocationComponentOptions.Builder |
maxZoomIconScale(float maxZoomIconScale)
Sets the scale factor of the location icon when the map is zoomed in.
|
LocationComponentOptions.Builder |
minZoom(double minZoom)
Sets the minimum zoom level the map can be displayed at.
|
LocationComponentOptions.Builder |
minZoomIconScale(float minZoomIconScale)
Sets the scale factor of the location icon when the map is zoomed out.
|
LocationComponentOptions.Builder |
padding(int[] padding)
Sets the distance from the edges of the map view’s frame to the edges of the map
view’s logical viewport.
|
LocationComponentOptions.Builder |
staleStateTimeout(long timeout)
Set the timeout before the location icon becomes stale.
|
LocationComponentOptions.Builder |
trackingAnimationDurationMultiplier(float trackingAnimationDurationMultiplier)
Sets the tracking animation duration multiplier.
|
LocationComponentOptions.Builder |
trackingGesturesManagement(boolean trackingGesturesManagement)
Set whether gesture threshold should be adjusted when camera is in one of the tracking modes.
|
LocationComponentOptions.Builder |
trackingInitialMoveThreshold(float moveThreshold)
Sets minimum single pointer movement (map pan) in pixels required to break camera tracking.
|
LocationComponentOptions.Builder |
trackingMultiFingerMoveThreshold(float moveThreshold)
Sets minimum multi pointer movement (map pan) in pixels required to break camera tracking
(for example during scale gesture).
|
@NonNull public LocationComponentOptions build()
LocationComponentOptions
class.LocationComponentOptions
@NonNull public LocationComponentOptions.Builder accuracyAlpha(float accuracyAlpha)
accuracyAlpha
- the opacity of the accuracy view@NonNull public LocationComponentOptions.Builder accuracyColor(int accuracyColor)
accuracyColor
- the color of the accuracy view@NonNull public LocationComponentOptions.Builder backgroundDrawableStale(int backgroundDrawableStale)
backgroundDrawableStale
- the drawable resource ID@NonNull public LocationComponentOptions.Builder backgroundStaleName(@Nullable java.lang.String backgroundStaleName)
DingiMap.addImage(String, Bitmap)
, the
component, will used this image in place of the provided or default dingi_backgroundDrawableStale.
A maki-icon name (example: "circle-15") may also be provided. These are images that can be loaded with certain styles. Note, this will fail if the provided icon name is not provided by the loaded map style.
backgroundStaleName
- String icon or maki-icon name@NonNull public LocationComponentOptions.Builder foregroundDrawableStale(int foregroundDrawableStale)
foregroundDrawableStale
- the drawable resource ID@NonNull public LocationComponentOptions.Builder foregroundStaleName(@Nullable java.lang.String foregroundStaleName)
DingiMap.addImage(String, Bitmap)
, the
component, will used this image in place of the provided or default dingi_foregroundDrawableStale.
A maki-icon name (example: "circle-15") may also be provided. These are images that can be loaded with certain styles. Note, this will fail if the provided icon name is not provided by the loaded map style.
foregroundStaleName
- String icon or maki-icon name@NonNull public LocationComponentOptions.Builder gpsDrawable(int gpsDrawable)
gpsDrawable
- the drawable resource ID@NonNull public LocationComponentOptions.Builder gpsName(@Nullable java.lang.String gpsName)
DingiMap.addImage(String, Bitmap)
, the
component, will used this image in place of the provided or default dingi_gpsDrawable.
A maki-icon name (example: "circle-15") may also be provided. These are images that can be loaded with certain styles. Note, this will fail if the provided icon name is not provided by the loaded map style.
gpsName
- String icon or maki-icon name@NonNull public LocationComponentOptions.Builder foregroundDrawable(int foregroundDrawable)
foregroundDrawable
- the drawable resource used for the foreground layer@NonNull public LocationComponentOptions.Builder foregroundName(@Nullable java.lang.String foregroundName)
DingiMap.addImage(String, Bitmap)
, the
component, will used this image in place of the provided or default dingi_foregroundDrawable.
A maki-icon name (example: "circle-15") may also be provided. These are images that can be loaded with certain styles. Note, this will fail if the provided icon name is not provided by the loaded map style.
foregroundName
- String icon or maki-icon name@NonNull public LocationComponentOptions.Builder backgroundDrawable(int backgroundDrawable)
backgroundDrawable
- the drawable resource ID@NonNull public LocationComponentOptions.Builder backgroundName(@Nullable java.lang.String backgroundName)
DingiMap.addImage(String, Bitmap)
, the
component, will used this image in place of the provided or default dingi_backgroundDrawable.
A maki-icon name (example: "circle-15") may also be provided. These are images that can be loaded with certain styles. Note, this will fail if the provided icon name is not provided by the loaded map style.
backgroundName
- String icon or maki-icon name@NonNull public LocationComponentOptions.Builder bearingDrawable(int bearingDrawable)
bearingDrawable
- the drawable resource ID@NonNull public LocationComponentOptions.Builder bearingName(@Nullable java.lang.String bearingName)
DingiMap.addImage(String, Bitmap)
, the
component, will used this image in place of the provided or default dingi_bearingDrawable.
A maki-icon name (example: "circle-15") may also be provided. These are images that can be loaded with certain styles. Note, this will fail if the provided icon name is not provided by the loaded map style.
bearingName
- String icon or maki-icon name@NonNull public LocationComponentOptions.Builder bearingTintColor(@Nullable java.lang.Integer bearingTintColor)
bearingTintColor
- the color integer resource@NonNull public LocationComponentOptions.Builder foregroundTintColor(@Nullable java.lang.Integer foregroundTintColor)
foregroundTintColor
- the color integer resource@NonNull public LocationComponentOptions.Builder backgroundTintColor(@Nullable java.lang.Integer backgroundTintColor)
backgroundTintColor
- the color integer resource@NonNull public LocationComponentOptions.Builder foregroundStaleTintColor(@Nullable java.lang.Integer foregroundStaleTintColor)
foregroundStaleTintColor
- the color integer resource@NonNull public LocationComponentOptions.Builder backgroundStaleTintColor(@Nullable java.lang.Integer backgroundStaleTintColor)
backgroundStaleTintColor
- the color integer resource@NonNull public LocationComponentOptions.Builder elevation(float elevation)
elevation
- the elevation currently set for the location icon@NonNull public LocationComponentOptions.Builder enableStaleState(boolean enabled)
enabled
- whether the stale state mode is enabled or not@NonNull public LocationComponentOptions.Builder staleStateTimeout(long timeout)
timeout
- the duration in milliseconds which it should take before the location is
considered stale@NonNull public LocationComponentOptions.Builder padding(@Nullable int[] padding)
When the value of this property is equal to {0,0,0,0}, viewport properties such as `centerCoordinate` assume a viewport that matches the map view’s frame. Otherwise, those properties are inset, excluding part of the frame from the viewport. For instance, if the only the top edge is inset, the map center is effectively shifted downward.
padding
- The margins for the map in pixels (left, top, right, bottom).@NonNull public LocationComponentOptions.Builder maxZoom(double maxZoom)
The default maximum zoomn level is 22. The upper bound for this value is 25.5.
maxZoom
- The new maximum zoom level.@NonNull public LocationComponentOptions.Builder minZoom(double minZoom)
minZoom
- The new minimum zoom level.@NonNull public LocationComponentOptions.Builder maxZoomIconScale(float maxZoomIconScale)
LocationComponentOptions.maxZoom()
.
Scaling is linear and the new pixel size of the image will be the original pixel size multiplied by the argument.
Set both this and minZoomIconScale(float)
to 1f to disable location icon scaling.
maxZoomIconScale
- icon scale factor@NonNull public LocationComponentOptions.Builder minZoomIconScale(float minZoomIconScale)
LocationComponentOptions.maxZoom()
.
Scaling is linear and the new pixel size of the image will be the original pixel size multiplied by the argument.
Set both this and maxZoomIconScale(float)
to 1f to disable location icon scaling.
minZoomIconScale
- icon scale factor@NonNull public LocationComponentOptions.Builder trackingGesturesManagement(boolean trackingGesturesManagement)
Note: This can overwrite some of the gesture thresholds
and the custom AndroidGesturesManager
that was set with
DingiMap.setGesturesManager(AndroidGesturesManager, boolean, boolean)
.
trackingGesturesManagement
- true if gestures should be adjusted when in one of the camera tracking modes,
false otherwisetrackingInitialMoveThreshold(float)
,
trackingMultiFingerMoveThreshold(float)
@NonNull public LocationComponentOptions.Builder trackingInitialMoveThreshold(float moveThreshold)
moveThreshold
- the minimum movement@NonNull public LocationComponentOptions.Builder trackingMultiFingerMoveThreshold(float moveThreshold)
moveThreshold
- the minimum movement@NonNull public LocationComponentOptions.Builder layerBelow(java.lang.String layerBelow)
layerBelow
- the id to set the location component below to.@NonNull public LocationComponentOptions.Builder trackingAnimationDurationMultiplier(float trackingAnimationDurationMultiplier)
trackingAnimationDurationMultiplier
- the tracking animation duration multiplier