Error while updating property 'lineCap' of a view managed by: AIRMapPolyline in expo
Asked Answered
G

1

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>
Guernsey answered 9/7, 2021 at 17:5 Comment(0)
G
10

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

 <MapViewDirections
      lineDashPattern={[0]}
      origin={origin}
      destination={destination}
      apikey={GOOGLE_MAPS_APIKEY}
      
    />
Guernsey answered 9/7, 2021 at 19:30 Comment(2)
If you don't want your polyline dashed, add lineCap="square" to the props of the polylineIdiomatic
this was really helpful, thank youJeramey

© 2022 - 2024 — McMap. All rights reserved.