1 year ago
#380562
nicole
TypeError: Cannot read properties of undefined (reading 'maps')
I am trying to use the DistanceMatrixService from @react-google-maps/api. One of the required parameters is the 'travelMode'. However, when I tried setting 'travelMode' to 'DRIVING', it shows the following!
I tried doing travelMode: google.maps.TravelMode.DRIVING but it also throws a type error
TypeError: Cannot read properties of undefined (reading 'maps')
Here is a snippet of my code where I call the Distance Matrix Service.
react-native
google-distancematrix-api
distance-matrix
react-google-maps-api
0 Answers
Your Answer