6

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>
Ibad Ur Rehman
  • 696
  • 1
  • 9
  • 16

1 Answers1

10

lineDashPattern={[number]} add this in polyline or react MapViewDirections

 <MapViewDirections
      lineDashPattern={[0]}
      origin={origin}
      destination={destination}
      apikey={GOOGLE_MAPS_APIKEY}
      
    />
Ibad Ur Rehman
  • 696
  • 1
  • 9
  • 16