I've been trying to build an app for navigation to practice my React Native coding skills until I encountered an issue regarding the native maps (at least for the iPhone).
I want the route to be displayed only on the upper side of the screen (top half). I am trying to use 'edgePadding' property but it doesn't affect the map no matter what values i send to it. This is what it automaticly renders:
As I said, I want the route always to be displayed on the top half so the component doesn't block it. Like the following:
useEffect(() => {
if (!origin || !destination) return;
// Zoom & fit to markers
mapRef.current.fitToSuppliedMarkers(['origin', 'destination'], {
edgePadding: { top: 50, bottom: 200, left: 50, right: 50}, // <= doesn't work
});
}, [origin, destination])