mirror of
https://github.com/status-im/react-native-mapbox-gl.git
synced 2026-08-30 12:31:11 +00:00
Added method for getting current bounds
Using recommended apporach until more native call is available.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user