public static class LocationComponentActivationOptions.Builder extends Object
LocationComponentActivationOptions
.Constructor and Description |
---|
Builder(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(LocationEngine locationEngine)
Deliver your own
LocationEngine to the LocationComponent. |
LocationComponentActivationOptions.Builder |
locationEngineRequest(LocationEngineRequest locationEngineRequest) |
LocationComponentActivationOptions.Builder |
styleRes(int styleRes) |
LocationComponentActivationOptions.Builder |
useDefaultLocationEngine(boolean useDefaultLocationEngine) |
public Builder(Context context, 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.public LocationComponentActivationOptions.Builder locationEngine(LocationEngine locationEngine)
LocationEngine
to the LocationComponent.
The true/false
LocationComponentActivationOptions#builder(Context, Style)#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(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© 2015–2019 Mapbox. All rights reserved.