Class ScaleBarPlugin

java.lang.Object
com.trimblemaps.mapsdk.plugins.scalebar.ScaleBarPlugin

public class ScaleBarPlugin extends Object
Plugin class that shows a scale bar on MapView and changes the scale corresponding to the MapView's scale.
  • Constructor Details

    • ScaleBarPlugin

      public ScaleBarPlugin(@NonNull com.trimblemaps.mapsdk.maps.MapView mapView, @NonNull com.trimblemaps.mapsdk.maps.TrimbleMapsMap map)
  • Method Details

    • create

      public ScaleBarWidget create(@NonNull ScaleBarOptions option)
      Create a scale bar widget on mapView.
      Parameters:
      option - The scale bar widget options that used to build scale bar widget.
      Returns:
      The created ScaleBarWidget instance.
    • isEnabled

      public boolean isEnabled()
      Returns true if the scale plugin is currently enabled and visible.
      Returns:
      true if enabled, false otherwise
    • setEnabled

      @UiThread public void setEnabled(boolean enabled)
      Toggles the scale plugin state.

      If the scale plugin wasn enabled, a TrimbleMapsMap.OnCameraMoveListener will be added to the MapView to listen to scale change events to update the state of this plugin. If the plugin was disabled the TrimbleMapsMap.OnCameraMoveListener will be removed from the map.