public static class LocationComponentOptions.Builder
extends java.lang.Object
LocationComponentOptions
.Modifier and Type | Method | 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 |
accuracyAnimationEnabled(boolean accuracyAnimationEnabled) |
Enable or disable smooth animation of the accuracy circle around the user's position.
|
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
Style.addImage(String, Bitmap) , the
component, will used this image in place of the provided or default trimblemaps_backgroundDrawable. |
LocationComponentOptions.Builder |
backgroundStaleName(java.lang.String backgroundStaleName) |
Given a String image name, identical to one used in
the first parameter of
Style.addImage(String, Bitmap) , the
component, will used this image in place of the provided or default trimblemaps_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
Style.addImage(String, Bitmap) , the
component, will used this image in place of the provided or default trimblemaps_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 |
compassAnimationEnabled(java.lang.Boolean compassAnimationEnabled) |
Enable or disable smooth animation of compass values for
CameraMode
and RenderMode . |
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
Style.addImage(String, Bitmap) , the
component, will used this image in place of the provided or default trimblemaps_foregroundDrawable. |
LocationComponentOptions.Builder |
foregroundStaleName(java.lang.String foregroundStaleName) |
Given a String image name, identical to one used in
the first parameter of
Style.addImage(String, Bitmap) , the
component, will used this image in place of the provided or default trimblemaps_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
Style.addImage(String, Bitmap) , the
component, will used this image in place of the provided or default trimblemaps_gpsDrawable. |
LocationComponentOptions.Builder |
layerAbove(java.lang.String layerAbove) |
Sets the id of the layer that's referenced when placing the component on the map using
Style.addLayerAbove(Layer, String) . |
LocationComponentOptions.Builder |
layerBelow(java.lang.String layerBelow) |
Sets the id of the layer that's referenced when placing the component on the map using
Style.addLayerBelow(Layer, String) . |
LocationComponentOptions.Builder |
maxZoomIconScale(float maxZoomIconScale) |
Sets the scale factor of the location icon when the map is zoomed in.
|
LocationComponentOptions.Builder |
minZoomIconScale(float minZoomIconScale) |
Sets the scale factor of the location icon when the map is zoomed out.
|
LocationComponentOptions.Builder |
padding(int[] padding) |
Deprecated.
Use
CameraPosition.Builder.padding(double[])
or CameraUpdateFactory.paddingTo(double[])
when not tracking and
LocationComponent.paddingWhileTracking(double[])
when CameraMode tracking is engaged to manipulate the padding. |
LocationComponentOptions.Builder |
pulseAlpha(float pulseAlpha) |
Sets the opacity of the LocationComponent's pulsing circle.
|
LocationComponentOptions.Builder |
pulseColor(int pulseColor) |
Sets the color of the LocationComponent's pulsing circle.
|
LocationComponentOptions.Builder |
pulseEnabled(boolean pulseEnabled) |
Enable or disable the LocationComponent's pulsing circle.
|
LocationComponentOptions.Builder |
pulseFadeEnabled(boolean pulseFadeEnabled) |
Enable or disable fading of the LocationComponent's pulsing circle.
|
LocationComponentOptions.Builder |
pulseInterpolator(android.view.animation.Interpolator pulseInterpolator) |
Sets the pulsing circle's interpolator animation.
|
LocationComponentOptions.Builder |
pulseMaxRadius(float pulseMaxRadius) |
The maximum radius that a single pulse should expand the LocationComponent's pulsing circle to.
|
LocationComponentOptions.Builder |
pulseSingleDuration(float pulseSingleDuration) |
Sets the number of milliseconds it takes for a single pulse of the LocationComponent's pulsing circle.
|
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).
|
LocationComponentOptions.Builder |
trackingMultiFingerProtectedMoveArea(android.graphics.RectF rect) |
Sets protected multi pointer gesture area.
|
@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)
Style.addImage(String, Bitmap)
, the
component, will used this image in place of the provided or default trimblemaps_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)
Style.addImage(String, Bitmap)
, the
component, will used this image in place of the provided or default trimblemaps_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)
Style.addImage(String, Bitmap)
, the
component, will used this image in place of the provided or default trimblemaps_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)
Style.addImage(String, Bitmap)
, the
component, will used this image in place of the provided or default trimblemaps_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)
Style.addImage(String, Bitmap)
, the
component, will used this image in place of the provided or default trimblemaps_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)
Style.addImage(String, Bitmap)
, the
component, will used this image in place of the provided or default trimblemaps_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 @Deprecated public LocationComponentOptions.Builder padding(@Nullable int[] padding)
CameraPosition.Builder.padding(double[])
or CameraUpdateFactory.paddingTo(double[])
when not tracking and
LocationComponent.paddingWhileTracking(double[])
when CameraMode
tracking is engaged to manipulate the 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 maxZoomIconScale(float maxZoomIconScale)
Set both this and minZoomIconScale(float)
to 1f to disable location icon scaling.
Scaling is based on the maps minimum and maximum zoom levels in time of component's style application.
maxZoomIconScale
- icon scale factor@NonNull public LocationComponentOptions.Builder minZoomIconScale(float minZoomIconScale)
Set both this and maxZoomIconScale(float)
to 1f to disable location icon scaling.
Scaling is based on the maps minimum and maximum zoom levels in time of component's style application.
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
TrimbleMapsMap.setGesturesManager(AndroidGesturesManager, boolean, boolean)
.
trackingGesturesManagement
- true if gestures should be adjusted when in one of the camera tracking modes,
false otherwisetrackingInitialMoveThreshold(float)
,
trackingMultiFingerMoveThreshold(float)
,
trackingMultiFingerProtectedMoveArea(RectF)
@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 trackingMultiFingerProtectedMoveArea(@Nullable android.graphics.RectF rect)
Best paired with the trackingMultiFingerMoveThreshold(float)
set to 0 or a relatively small value to not interfere with gestures outside of the defined rectangle.
rect
- the protected multi finger area while camera is tracking@NonNull public LocationComponentOptions.Builder layerAbove(java.lang.String layerAbove)
Style.addLayerAbove(Layer, String)
.
The component is going to placed directly above this layer.
layerAbove
- the id of the layer the component is going to placed directly above.@NonNull public LocationComponentOptions.Builder layerBelow(java.lang.String layerBelow)
Style.addLayerBelow(Layer, String)
.
The component is going to placed directly below this layer.
layerBelow
- the id of the layer the component is going to placed directly below.@NonNull public LocationComponentOptions.Builder trackingAnimationDurationMultiplier(float trackingAnimationDurationMultiplier)
This value is ignored if LocationUpdate.Builder.animationDuration(Long)
is provided.
trackingAnimationDurationMultiplier
- the tracking animation duration multiplierpublic LocationComponentOptions.Builder compassAnimationEnabled(java.lang.Boolean compassAnimationEnabled)
CameraMode
and RenderMode
.public LocationComponentOptions.Builder accuracyAnimationEnabled(boolean accuracyAnimationEnabled)
public LocationComponentOptions.Builder pulseEnabled(boolean pulseEnabled)
public LocationComponentOptions.Builder pulseFadeEnabled(boolean pulseFadeEnabled)
public LocationComponentOptions.Builder pulseColor(int pulseColor)
public LocationComponentOptions.Builder pulseSingleDuration(float pulseSingleDuration)
public LocationComponentOptions.Builder pulseMaxRadius(float pulseMaxRadius)
public LocationComponentOptions.Builder pulseAlpha(float pulseAlpha)
public LocationComponentOptions.Builder pulseInterpolator(android.view.animation.Interpolator pulseInterpolator)
pulseInterpolator
- the type of Android-system interpolator to use when
creating the pulsing animation