[android] - add convenience method for destroyed state on MapView, can be used to determine if an asynchrous result should be set on map.
This commit is contained in:
@@ -425,6 +425,19 @@ public class MapView extends FrameLayout implements NativeMapView.ViewCallback {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns if the map has been destroyed.
|
||||
* <p>
|
||||
* This method can be used to determine if the result of an asynchronous operation should be set.
|
||||
* </p>
|
||||
*
|
||||
* @return true, if the map has been destroyed
|
||||
*/
|
||||
@UiThread
|
||||
public boolean isDestroyed() {
|
||||
return destroyed;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onTouchEvent(MotionEvent event) {
|
||||
if (!isMapInitialized() || !isZoomButtonControllerInitialized() || !isGestureDetectorInitialized()) {
|
||||
|
||||
Reference in New Issue
Block a user