-
-
Notifications
You must be signed in to change notification settings - Fork 848
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[android] Fix padding addition #973
[android] Fix padding addition #973
Conversation
Testcase import React from 'react';
import {SafeAreaView, Button} from 'react-native';
import MapboxGL, {
MapView,
ShapeSource,
LineLayer,
Camera,
} from '@react-native-mapbox-gl/maps';
import accessToken from './accesstoken.json';
MapboxGL.setAccessToken(accessToken);
const aLine = {
type: 'LineString',
coordinates: [[-74.00597, 40.71427], [-74.00697, 40.71527]],
};
class BugReportExample extends React.Component {
render() {
return (
<SafeAreaView style={{flex: 1, flexDirection: 'column'}}>
<Button
title="fitBounds"
onPress={() => {
this.camera.fitBounds(
[-74.00597, 40.71427],
[-74.00697, 40.71527],
[0, 0, 300, 0],
);
}}
/>
<Button
title="fitBounds2"
onPress={() => {
this.camera.fitBounds(
[-74.00597, 40.71427],
[-74.00697, 40.71527],
[300, 0, 0, 0],
);
}}
/>
<MapView style={{flex: 1}}>
<Camera
centerCoordinate={[-74.00597, 40.71427]}
zoomLevel={14}
ref={ref => {
this.camera = ref;
}}
/>
<ShapeSource id="idStreetLayer" shape={aLine}>
<LineLayer id="idStreetLayer" />
</ShapeSource>
</MapView>
</SafeAreaView>
);
}
}
export default BugReportExample; |
This essentially reverts #202. Has the iOS behavior changed to make that unnecessary? It seems almost like we fix one or the other, since they're opposites. |
But since #202
I'll try to see how this PR works with issue mentioned in #201. Padding on iOS is currently broken see #841 and i don't see an easy way to work around that - see underlying issue. |
12d1ba6
to
51567e4
Compare
@sunny-lirr |
Fixes: #956