Example usage for com.facebook.react.uimanager NativeViewHierarchyManager resolveView

List of usage examples for com.facebook.react.uimanager NativeViewHierarchyManager resolveView

Introduction

In this page you can find the example usage for com.facebook.react.uimanager NativeViewHierarchyManager resolveView.

Prototype

public final synchronized View resolveView(int tag) 

Source Link

Usage

From source file:com.boundlessgeo.spatialconnect.jsbridge.RNSpatialConnect.java

License:Apache License

@ReactMethod
public void bindMapView(final int tag, final Callback successCallback) {
    UIManagerModule uiManager = this.reactContext.getNativeModule(UIManagerModule.class);
    uiManager.addUIBlock(new UIBlock() {
        public void execute(NativeViewHierarchyManager nvhm) {
            MapView mapView = (MapView) nvhm.resolveView(tag);
            //mapView.getMapAsync(this);
            mapView.getMapAsync(new OnMapReadyCallback() {
                @Override//w w  w.  j  av  a2s . co m
                public void onMapReady(final GoogleMap googleMap) {
                    mGoogleMap = googleMap;
                    successCallback.invoke(false, "success");
                }
            });
        }
    });
}