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>
lineDashPattern={[number]} add this in polyline or react MapViewDirections
<MapViewDirections
lineDashPattern={[0]}
origin={origin}
destination={destination}
apikey={GOOGLE_MAPS_APIKEY}
/>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With