public class ScaleBarPlugin extends Object
| Constructor and Description |
|---|
ScaleBarPlugin(MapView mapView,
MapboxMap mapboxMap) |
| Modifier and Type | Method and Description |
|---|---|
ScaleBarWidget |
create(ScaleBarOptions option)
Create a scale bar widget on mapView.
|
boolean |
isEnabled()
Returns true if the scale plugin is currently enabled and visible.
|
void |
setEnabled(boolean enabled)
Toggles the scale plugin state.
|
public ScaleBarWidget create(ScaleBarOptions option)
option - The scale bar widget options that used to build scale bar widget.public boolean isEnabled()
public void setEnabled(boolean enabled)
If the scale plugin wasn enabled, a com.mapbox.mapboxsdk.maps.MapboxMap.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 com.mapbox.mapboxsdk.maps.MapboxMap.OnCameraMoveListener
will be removed from the map.
© 2015–2019 Mapbox. All rights reserved.