mirror of
https://github.com/status-im/react-native-mapbox-gl.git
synced 2026-08-30 12:31:11 +00:00
add set visible bounds method
This commit is contained in:
@@ -77,6 +77,20 @@ public class ReactNativeMapboxGLModule extends ReactContextBaseJavaModule {
|
||||
aPackage.getManager().setTilt(aPackage.getManager().getMapView(), pitch);
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
public void setVisibleCoordinateBounds(double latSW, double lngSW,double latNE, double lngNE, float paddingTop, float paddingRight, float paddingBottom, float paddingLeft) {
|
||||
WritableMap info = Arguments.createMap();
|
||||
info.putDouble("latSW", latSW);
|
||||
info.putDouble("lngSW", lngSW);
|
||||
info.putDouble("latNE", latNE);
|
||||
info.putDouble("lngNE", lngNE);
|
||||
info.putDouble("paddingTop", paddingTop);
|
||||
info.putDouble("paddingRight", paddingRight);
|
||||
info.putDouble("paddingBottom", paddingBottom);
|
||||
info.putDouble("paddingLeft", paddingLeft);
|
||||
aPackage.getManager().setVisibleCoordinateBounds(aPackage.getManager().getMapView(), info);
|
||||
}
|
||||
|
||||
public void setPackage(ReactNativeMapboxGLPackage aPackage) {
|
||||
this.aPackage = aPackage;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user