Closed esadkrs closed 3 years ago
Hi,
Can anyone please help on how I can pass data from
onReady
event to a<Text>
widget on the Marker/Callout? I wanna be able to display the distance on the text basically.See below for the detailed question.
```
<MapViewDirections origin={userLocation} destination={selectedDirection} strokeColor={'#0076BC'} apikey={'XXXXXXXXXXX'} strokeWidth={5} onReady={setDirectionData} />
Like in the above example you can pass a callback function and set data into the state and use
`<Text>{directionData.distance}</Text>`
Hi,
Can anyone please help on how I can pass data from
onReady
event to a<Text>
widget on the Marker/Callout? I wanna be able to display the distance on the text basically.See below for the detailed question.
Example Question