Class LocationComponentActivationOptions

java.lang.Object
com.trimblemaps.mapsdk.location.LocationComponentActivationOptions

public class LocationComponentActivationOptions extends Object
A class which holds the various options for activating the Maps SDK's LocationComponent to eventually show the device location on the map.
  • Method Details

    • builder

      @NonNull public static LocationComponentActivationOptions.Builder builder(@NonNull android.content.Context context, @NonNull Style fullyLoadedMapStyle)
      Convenience method to retrieve a LocationComponentActivationOptions object which is ready to build with
      Returns:
      a builder object
    • context

      @NonNull public android.content.Context context()
      The application's current context
      Returns:
      the application's current context
    • style

      @NonNull public Style style()
      The proxy object for current map style. More info at Style
      Returns:
      the map's fully loaded Style object
    • locationEngine

      @Nullable public com.trimblemaps.android.core.location.LocationEngine locationEngine()
      The LocationEngine which the LocationComponent should use
      Returns:
      the engine
    • locationEngineRequest

      @Nullable public com.trimblemaps.android.core.location.LocationEngineRequest locationEngineRequest()
      The location request which the LocationComponent should use
      Returns:
      the LocationEngineRequest object
    • locationComponentOptions

      @Nullable public LocationComponentOptions locationComponentOptions()
      A built LocationComponentOptions object, which holds the various LocationComponent styling options
      Returns:
      the options for styling the actual LocationComponent
    • styleRes

      public int styleRes()
      The LocationComponent style resource (e.g. R.style.style_name)
      Returns:
      the style resource.
    • useDefaultLocationEngine

      public 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
      Returns:
      whether the default LocationEngine is used
    • useSpecializedLocationLayer

      public boolean useSpecializedLocationLayer()
      True if you want to initialize and use the specialized location layer to render the location puck.

      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:

      Returns:
      whether the default specialized location layer is used