maplibre-react-native
maplibre-react-native copied to clipboard
Default `MapView` is not centered
Describe and reproduce the Bug
On my Android Emulator the map is always off center initially when no Camera is given:
import {
CircleLayer,
MapView,
ShapeSource,
} from "@maplibre/maplibre-react-native";
export function BugReport() {
return (
<MapView style={{ flex: 1 }}>
<ShapeSource id="shape" shape={{ type: "Point", coordinates: [0, 0] }}>
<CircleLayer
id="circle"
style={{ circleRadius: 8, circleColor: "red" }}
/>
</ShapeSource>
</MapView>
);
}
@maplibre/maplibre-react-native Version
main
Which platforms does this occur on?
Android Emulator
Which frameworks does this occur on?
React Native
Which architectures does this occur on?
Old Architecture
Environment
–
@KiwiKilian From what I see, MLRN doesn't actually have default values for Camera.centerCoordinate or Camera.defaultSettings.centerCoordinate, meaning that the bug is in the native library. OTOH, maybe it makes sense for a downstream library like MLRN to have it's own defaults?