public class LocationComponentActivationOptions
extends java.lang.Object
LocationComponent
to eventually
show the device location on the map.Modifier and Type | Class | Description |
---|---|---|
static class |
LocationComponentActivationOptions.Builder |
Builder class for constructing a new instance of
LocationComponentActivationOptions . |
Modifier and Type | Method | Description |
---|---|---|
static LocationComponentActivationOptions.Builder |
builder(android.content.Context context,
Style fullyLoadedMapStyle) |
Convenience method to retrieve a
LocationComponentActivationOptions object which is ready to build with |
android.content.Context |
context() |
The application's current context
|
LocationComponentOptions |
locationComponentOptions() |
A built
LocationComponentOptions object, which holds the various LocationComponent styling options |
com.trimblemaps.android.core.location.LocationEngine |
locationEngine() |
The
LocationEngine which the LocationComponent should use |
com.trimblemaps.android.core.location.LocationEngineRequest |
locationEngineRequest() |
The location request which the
LocationComponent should use |
Style |
style() |
The proxy object for current map style.
|
int |
styleRes() |
The LocationComponent style resource (e.g.
|
boolean |
useDefaultLocationEngine() |
True if you want to initialize and use the built-in location engine or false if there should be no
location engine initialized
|
boolean |
useSpecializedLocationLayer() |
True if you want to initialize and use the specialized location layer to render the location puck.
|
@NonNull public static LocationComponentActivationOptions.Builder builder(@NonNull android.content.Context context, @NonNull Style fullyLoadedMapStyle)
LocationComponentActivationOptions
object which is ready to build with@NonNull public android.content.Context context()
@NonNull public Style style()
Style
@Nullable public com.trimblemaps.android.core.location.LocationEngine locationEngine()
LocationEngine
which the LocationComponent
should use@Nullable public com.trimblemaps.android.core.location.LocationEngineRequest locationEngineRequest()
LocationComponent
should use@Nullable public LocationComponentOptions locationComponentOptions()
LocationComponentOptions
object, which holds the various LocationComponent
styling optionspublic int styleRes()
public boolean useDefaultLocationEngine()
public boolean useSpecializedLocationLayer()
The specialized layer is not based on runtime styling. This brings significant performance improvements, but since it's not based on the runtime styling, it's not fully compatible with the traditional implementation. The incompatibilities are:
LocationComponentConstants.BACKGROUND_LAYER
,
LocationComponentConstants.ACCURACY_LAYER
or LocationComponentConstants.LOCATION_SOURCE
are ignored.
The only usable and valid for relative positioning layer ID is
LocationComponentConstants.FOREGROUND_LAYER
.
LocationComponentOptions.foregroundName()
, are ignored.
Use LocationComponentOptions.foregroundDrawable()
to alter the image rendered as the puck.
LocationComponentOptions
'
pulsing methods such as LocationComponentOptions.pulseEnabled()
or
LocationComponentOptions.pulseColor()
, are useless when using the
the specialized location layer.