Tag defining to which vehicles this duration and distance matrix applies. If empty, this applies to all vehicles, and there can only be a single matrix. Each vehicle start must match exactly one matrix, i.e. exactly one of their start_tags field must match the vehicle_start_tag of a matrix (and of that matrix only). All matrices must have a different vehicle_start_tag.
Tag defining to which vehicles this duration and distance matrix applies.
If empty, this applies to all vehicles, and there can only be a single
matrix.
Each vehicle start must match exactly one matrix, i.e. exactly one of
their start_tags field must match the vehicle_start_tag of a matrix
(and of that matrix only).
All matrices must have a different vehicle_start_tag.
Returns
Type
Description
string
setVehicleStartTag
Tag defining to which vehicles this duration and distance matrix applies.
If empty, this applies to all vehicles, and there can only be a single
matrix.
Each vehicle start must match exactly one matrix, i.e. exactly one of
their start_tags field must match the vehicle_start_tag of a matrix
(and of that matrix only).
All matrices must have a different vehicle_start_tag.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Google Maps Route Optimization V1 Client - Class DurationDistanceMatrix (0.4.1)\n\nVersion latestkeyboard_arrow_down\n\n- [0.4.1 (latest)](/php/docs/reference/maps-routeoptimization/latest/V1.ShipmentModel.DurationDistanceMatrix)\n- [0.4.0](/php/docs/reference/maps-routeoptimization/0.4.0/V1.ShipmentModel.DurationDistanceMatrix)\n- [0.3.3](/php/docs/reference/maps-routeoptimization/0.3.3/V1.ShipmentModel.DurationDistanceMatrix)\n- [0.2.0](/php/docs/reference/maps-routeoptimization/0.2.0/V1.ShipmentModel.DurationDistanceMatrix)\n- [0.1.0](/php/docs/reference/maps-routeoptimization/0.1.0/V1.ShipmentModel.DurationDistanceMatrix) \nReference documentation and code samples for the Google Maps Route Optimization V1 Client class DurationDistanceMatrix.\n\nSpecifies a duration and distance matrix from visit and vehicle start\nlocations to visit and vehicle end locations.\n\nGenerated from protobuf message `google.maps.routeoptimization.v1.ShipmentModel.DurationDistanceMatrix`\n\nNamespace\n---------\n\nGoogle \\\\ Maps \\\\ RouteOptimization \\\\ V1 \\\\ ShipmentModel\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getRows\n\nSpecifies the rows of the duration and distance matrix. It must have as\nmany elements as\n[ShipmentModel.duration_distance_matrix_src_tags](/php/docs/reference/maps-routeoptimization/latest/V1.ShipmentModel#_Google_Maps_RouteOptimization_V1_ShipmentModel__getDurationDistanceMatrixSrcTags__).\n\n### setRows\n\nSpecifies the rows of the duration and distance matrix. It must have as\nmany elements as\n[ShipmentModel.duration_distance_matrix_src_tags](/php/docs/reference/maps-routeoptimization/latest/V1.ShipmentModel#_Google_Maps_RouteOptimization_V1_ShipmentModel__getDurationDistanceMatrixSrcTags__).\n\n### getVehicleStartTag\n\nTag defining to which vehicles this duration and distance matrix applies.\n\nIf empty, this applies to all vehicles, and there can only be a single\nmatrix.\nEach vehicle start must match exactly one matrix, i.e. exactly one of\ntheir `start_tags` field must match the `vehicle_start_tag` of a matrix\n(and of that matrix only).\nAll matrices must have a different `vehicle_start_tag`.\n\n### setVehicleStartTag\n\nTag defining to which vehicles this duration and distance matrix applies.\n\nIf empty, this applies to all vehicles, and there can only be a single\nmatrix.\nEach vehicle start must match exactly one matrix, i.e. exactly one of\ntheir `start_tags` field must match the `vehicle_start_tag` of a matrix\n(and of that matrix only).\nAll matrices must have a different `vehicle_start_tag`."]]