public class MapboxMapTrafficPresenter extends java.lang.Object implements ZoomObservable, PolylineDisplayer
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_TRAFFIC_EXTERIOR_PADDING |
static int |
DEFAULT_TRAFFIC_INTERIOR_PADDING |
static long |
DEFAULT_TRAFFIC_REFRESH_DURATION_MS |
static TrafficRefreshSettings |
DEFAULT_TRAFFIC_REFRESH_SETTINGS |
static float |
DEFAULT_TRAFFIC_ZOOM_THRESHOLD |
Constructor and Description |
---|
MapboxMapTrafficPresenter(MapboxMap mapboxMap,
MapView mapView) |
Modifier and Type | Method and Description |
---|---|
LayerController |
addLayer(Layer layer,
TrafficRefreshSettings trafficRefreshSettings) |
void |
addPolylineCollection(PolylineCollection polylineCollection) |
void |
addZoomListener(ZoomListener listener,
float threshold) |
TrafficIncidentLayer |
getTrafficIncidentLayer() |
boolean |
isTrafficFlowLayerOn() |
boolean |
isTrafficIncidentLayerOn() |
void |
removePolylineCollection(PolylineCollection polylineCollection) |
void |
removeZoomListener(ZoomListener listener) |
void |
setTrafficConfigProvider(ConfigProvider provider) |
void |
setTrafficFlowLayerOff() |
void |
setTrafficFlowLayerOn() |
void |
setTrafficFlowLayerOn(TrafficRefreshSettings trafficRefreshSettings) |
void |
setTrafficIncidentLayerOff() |
void |
setTrafficIncidentLayerOn() |
void |
setTrafficIncidentLayerOn(TrafficRefreshSettings trafficRefreshSettings) |
public static final long DEFAULT_TRAFFIC_REFRESH_DURATION_MS
public static final float DEFAULT_TRAFFIC_ZOOM_THRESHOLD
public static final int DEFAULT_TRAFFIC_EXTERIOR_PADDING
public static final int DEFAULT_TRAFFIC_INTERIOR_PADDING
public static final TrafficRefreshSettings DEFAULT_TRAFFIC_REFRESH_SETTINGS
public MapboxMapTrafficPresenter(MapboxMap mapboxMap, MapView mapView)
public void addPolylineCollection(PolylineCollection polylineCollection)
addPolylineCollection
in interface PolylineDisplayer
public void removePolylineCollection(PolylineCollection polylineCollection)
removePolylineCollection
in interface PolylineDisplayer
public void addZoomListener(ZoomListener listener, float threshold)
addZoomListener
in interface ZoomObservable
public void removeZoomListener(ZoomListener listener)
removeZoomListener
in interface ZoomObservable
public LayerController addLayer(Layer layer, TrafficRefreshSettings trafficRefreshSettings)
public void setTrafficFlowLayerOn()
public void setTrafficFlowLayerOn(TrafficRefreshSettings trafficRefreshSettings)
trafficRefreshSettings
- to modify existing tracking options the traffic layer must first be deactivated
and then reactivated with the new tracking optionspublic boolean isTrafficFlowLayerOn()
public void setTrafficFlowLayerOff()
public void setTrafficIncidentLayerOn()
public void setTrafficIncidentLayerOn(TrafficRefreshSettings trafficRefreshSettings)
trafficRefreshSettings
- to modify existing tracking options the traffic layer must first be deactivated
and then reactivated with the new tracking optionspublic boolean isTrafficIncidentLayerOn()
public void setTrafficIncidentLayerOff()
public TrafficIncidentLayer getTrafficIncidentLayer()
public void setTrafficConfigProvider(ConfigProvider provider)