Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Deprecate MapChange and provide dedicated callback methods #9498

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@

import com.mapbox.mapboxsdk.R;
import com.mapbox.mapboxsdk.constants.MapboxConstants;
import com.mapbox.mapboxsdk.maps.MapView;
import com.mapbox.mapboxsdk.maps.MapboxMap;
import com.mapbox.mapboxsdk.utils.AnimatorUtils;

Expand All @@ -34,7 +33,7 @@
* SDK views to be used as a symbol see https://github.com/mapbox/mapbox-gl-native/blob/68f32bc104422207c64da8d90e8411b138d87f04/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/style/SymbolGeneratorActivity.java
*/
@Deprecated
public class MarkerViewManager implements MapView.OnMapChangedListener {
public class MarkerViewManager {

private final ViewGroup markerViewContainer;
private final ViewTreeObserver.OnPreDrawListener markerViewPreDrawObserver =
Expand Down Expand Up @@ -75,9 +74,8 @@ public void bind(MapboxMap mapboxMap) {
this.mapboxMap = mapboxMap;
}

@Override
public void onMapChanged(@MapView.MapChange int change) {
if (isWaitingForRenderInvoke && change == MapView.DID_FINISH_RENDERING_FRAME_FULLY_RENDERED) {
public void onDidFinishRenderingFrameFully() {
if (isWaitingForRenderInvoke) {
isWaitingForRenderInvoke = false;
invalidateViewMarkersInVisibleRegion();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class AnnotationManager {
private Polygons polygons;
private Polylines polylines;

AnnotationManager(NativeMapView view, MapView mapView, LongSparseArray<Annotation> annotationsArray,
AnnotationManager(MapView mapView, LongSparseArray<Annotation> annotationsArray,
MarkerViewManager markerViewManager, IconManager iconManager, Annotations annotations,
Markers markers, Polygons polygons, Polylines polylines) {
this.mapView = mapView;
Expand All @@ -73,10 +73,6 @@ class AnnotationManager {
this.markers = markers;
this.polygons = polygons;
this.polylines = polylines;
if (view != null) {
// null checking needed for unit tests
view.addOnMapChangedListener(markerViewManager);
}
}

// TODO refactor MapboxMap out for Projection and Transform
Expand Down
Loading