I'm trying to use Node Js Google Library the method compute Routes. But in every execution i try i have: "catch getPathFromGoogle Error: 3 INVALID_ARGUMENT: FieldMask is a required parameter. See https://cloud.google.com/apis/docs/system-parameters on how to provide it. As an example, you can set the header 'X-Goog-FieldMask' to value 'routes.distanceMeters,routes.duration,routes.polyline.encodedPolyline' to ask for the route distance, duration, and polyline in the response. You can also set the value to '' in manual testing to get all the available response fields. However, using the '' wildcard is discouraged in production.'" How can i send this info to this method?
Here is my code:
r = await routingClient.computeRoutes({
params: {
origin: { lat: origin[1], lng: origin[0] },
destination: {lat: dest[1], lng: dest[0]}
},
timeout: 1000
});
An example of a code working with this method and how put X-Goog-FieldMask would be perfect.