public static class LocationComponentActivationOptions.Builder
extends java.lang.Object
LocationComponentActivationOptions.| Constructor and Description |
|---|
Builder(android.content.Context context,
Style style)
Constructor for the
LocationComponentActivationOptions builder class. |
| Modifier and Type | Method and Description |
|---|---|
LocationComponentActivationOptions |
build()
Method which actually builds the
LocationComponentActivationOptions object while
taking the various options into account. |
LocationComponentActivationOptions.Builder |
locationComponentOptions(LocationComponentOptions locationComponentOptions) |
LocationComponentActivationOptions.Builder |
locationEngine(com.mapbox.android.core.location.LocationEngine locationEngine)
Deliver your own
LocationEngine to the LocationComponent. |
LocationComponentActivationOptions.Builder |
locationEngineRequest(com.mapbox.android.core.location.LocationEngineRequest locationEngineRequest) |
LocationComponentActivationOptions.Builder |
styleRes(int styleRes) |
LocationComponentActivationOptions.Builder |
useDefaultLocationEngine(boolean useDefaultLocationEngine) |
public Builder(@NonNull
android.content.Context context,
@NonNull
Style style)
LocationComponentActivationOptions builder class.
While other activation options are optional, the activation process always requires
context and a fully-loaded map Style object, which is why the two are in this
constructor.@NonNull public LocationComponentActivationOptions.Builder locationEngine(@Nullable com.mapbox.android.core.location.LocationEngine locationEngine)
LocationEngine to the LocationComponent.
The true/false
LocationComponentActivationOptions.useDefaultLocationEngine()
activation option is ignored when a non-null LocationEngine is set via
this `locationEngine()` method.
locationEngine - a LocationEngine objectLocationComponentActivationOptions.Builder object being constructedpublic LocationComponentActivationOptions.Builder locationEngineRequest(com.mapbox.android.core.location.LocationEngineRequest locationEngineRequest)
locationEngineRequest - the location request which the
LocationComponent should useLocationComponentActivationOptions.Builder object being constructedpublic LocationComponentActivationOptions.Builder locationComponentOptions(LocationComponentOptions locationComponentOptions)
locationComponentOptions - a built LocationComponentOptions object,
which holds the various LocationComponent
styling optionsLocationComponentActivationOptions.Builder object being constructedpublic LocationComponentActivationOptions.Builder styleRes(int styleRes)
styleRes - the LocationComponent style resource (e.g. R.style.style_name)LocationComponentActivationOptions.Builder object being constructedpublic LocationComponentActivationOptions.Builder useDefaultLocationEngine(boolean useDefaultLocationEngine)
useDefaultLocationEngine - true if you want to initialize and use the
built-in location engine or false if there
should be no location engine initialized
This is ignored when null is set as the parameter
for (Context, Style)#locationEngine().LocationComponentActivationOptions.Builder object being constructedpublic LocationComponentActivationOptions build()
LocationComponentActivationOptions object while
taking the various options into account.LocationComponentActivationOptions object