expo version : sdk42 react-native-maps: 0.28 and 0.27.1 both using react-native-maps-directions here is code
<MapView
provider={PROVIDER_GOOGLE} // remove if not using Google Maps
style={styles.map}
region={getMapRegion()}
>
<MapViewDirections
origin={origin}
destination={destination}
apikey={GOOGLE_MAPS_APIKEY}
strokeWidth={3}
strokeColor="blue"
/>
<Marker
coordinate={getMapRegion()}
title="Test Title"
description="This is the test description"
>
<Callout tooltip>
<Text>{text}</Text>
</Callout>
</Marker>
</MapView>
lineCap="square"
to the props of the polyline – Idiomatic