Map Controls
Add interactive controls to your map for zoom and user location.
The MapControls component provides interactive controls that can be positioned on any corner of the map. Available controls include zoom in/out buttons and a locate button to find the user's current location.
Location Permissions: The locate button requires location permissions. Make sure you've configured permissions in your Info.plist (iOS) and AndroidManifest.xml (Android). See the
MapUserLocation component for automatic permission handling.
User Location
Use the MapUserLocation component to show the user's current location on the map with automatic permission handling:
<Map center={[0, 0]} zoom={12}>
<MapUserLocation
visible={true}
showAccuracy={true}
autoRequestPermission={true}
/>
<MapControls showZoom showLocate />
</Map>