0

When I take out the origin property of the Directions component, it runs with no errors but doesn't show the direction. When I put it, for obvious reasons, I get this error.

return (
    <View style={{flex: 1}}>
      <MapView
        style={{flex: 1}}
        region={region}
        showsUserLocation
        loadingEnabled>
        <MapView.Marker coordinate={region} />
        <MapView.Marker
          coordinate={{latitude: -9.645601, longitude: -35.734108}}
        />
        <MapViewDirections
          origin={{latitude: -9.64561693, longitude: -35.73592044}}
          destination={{latitude: -9.645601, longitude: -35.734108}}
          apikey={'AIzaSyBVFhY3cURPTbAoOnkyAeijkAt2kqRJ2iY'}
          strokeWidth={3}
          strokeColor="#333"
        />
      </MapView>
    </View>
  );
}

0 Answers0