public class PreciseMapTracker extends MapTracker
When map is changed, the handler will be notified with a larger extent than is actually visible. This "notification extent" will be the visible extent plus exterior padding around edges.
When the map is panned, the handler will not be notified of a change unless some part of the map becomes visible that was not contained in the notification extent. When the map is resized, the handler will be notified if the new area is significantly smaller. Interior padding is used to define how much smaller the visible extent + exterior padding can be before we are notified of a change. When the zoom is changed, the handler will be notified if the change in zoom exceeds the zoom threshold.
MapTracker.MapExtentChangeListener
mExtent, mMapboxMap, mMapChangeEventBatcher, mMapView
Constructor and Description |
---|
PreciseMapTracker(MapboxMap mapboxMap,
MapView mapView,
MapTracker.MapExtentChangeListener handler,
int exteriorPadding,
int interiorPadding,
float zoomThreshold,
java.lang.Long refreshDuration) |
Modifier and Type | Method and Description |
---|---|
LatLngExtent |
activate()
Activate the map tracker.
|
protected LatLngExtent |
buildExtent() |
void |
handleMapMove(LatLngExtent currentExtent,
double zoom) |
void |
handleMapResize(LatLngExtent currentExtent) |
convertPadding, convertRectToExtent, deactivate, getCurrentExtent, notifyHandler
public PreciseMapTracker(MapboxMap mapboxMap, MapView mapView, MapTracker.MapExtentChangeListener handler, int exteriorPadding, int interiorPadding, float zoomThreshold, java.lang.Long refreshDuration)
public void handleMapMove(LatLngExtent currentExtent, double zoom)
public void handleMapResize(LatLngExtent currentExtent)
public LatLngExtent activate()
MapTracker
activate
in class MapTracker
protected LatLngExtent buildExtent()
buildExtent
in class MapTracker