[android] #3276 - add event listener on REGION_IS_CHANGING to determine the annotations in bounds of the viewport.
This commit is contained in:
@@ -446,6 +446,13 @@ public class MapView extends FrameLayout {
|
||||
iterator.remove();
|
||||
}
|
||||
}
|
||||
} else if (change == REGION_IS_CHANGING) {
|
||||
LatLngBounds bounds = mMapboxMap.getProjection().getVisibleRegion().latLngBounds;
|
||||
long[] ids = mNativeMapView.getAnnotationsInBounds(bounds);
|
||||
Log.v(MapboxConstants.TAG, "Region is changing ane we are seeing: "+ids.length+ " point annotations");
|
||||
// for (long id : ids) {
|
||||
// Log.v(MapboxConstants.TAG, "Marker: "+id);
|
||||
// }
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -1318,6 +1325,8 @@ public class MapView extends FrameLayout {
|
||||
return;
|
||||
}
|
||||
|
||||
Log.v(MapboxConstants.TAG, "SurfaceTexture has been updated");
|
||||
|
||||
mCompassView.update(getDirection());
|
||||
mMyLocationView.update();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user