Added method for getting current bounds

Using recommended apporach until more native call is available.
This commit is contained in:
Max Schedin
2016-03-07 12:14:16 +01:00
parent 6e84c9e987
commit fd06c0b4ac
4 changed files with 26 additions and 0 deletions
@@ -133,6 +133,12 @@ public class ReactNativeMapboxGLModule extends ReactContextBaseJavaModule {
successCallback.invoke(location);
}
@ReactMethod
public void getBounds(int mapRef, Callback successCallback) {
WritableMap bounds = aPackage.getManager().getBounds(aPackage.getManager().getMapView());
successCallback.invoke(bounds);
}
public void setPackage(ReactNativeMapboxGLPackage aPackage) {
this.aPackage = aPackage;
}