The compass heading associated with the direction of the flow of traffic. This value is used to specify the side of the road to use for pickup and drop-off. Heading values can be from 0 to 360, where 0 specifies a heading of due North, 90 specifies a heading of due East, etc.
The compass heading associated with the direction of the flow of traffic.
This value is used to specify the side of the road to use for pickup and
drop-off. Heading values can be from 0 to 360, where 0 specifies a heading
of due North, 90 specifies a heading of due East, etc.
Returns
Type
Description
int
hasHeading
clearHeading
setHeading
The compass heading associated with the direction of the flow of traffic.
This value is used to specify the side of the road to use for pickup and
drop-off. Heading values can be from 0 to 360, where 0 specifies a heading
of due North, 90 specifies a heading of due East, etc.
[[["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-08-28 UTC."],[],[],null,["# Google Maps Route Optimization V1 Client - Class Location (0.4.1)\n\nVersion latestkeyboard_arrow_down\n\n- [0.4.1 (latest)](/php/docs/reference/maps-routeoptimization/latest/V1.Location)\n- [0.4.0](/php/docs/reference/maps-routeoptimization/0.4.0/V1.Location)\n- [0.3.3](/php/docs/reference/maps-routeoptimization/0.3.3/V1.Location)\n- [0.2.0](/php/docs/reference/maps-routeoptimization/0.2.0/V1.Location)\n- [0.1.0](/php/docs/reference/maps-routeoptimization/0.1.0/V1.Location) \nReference documentation and code samples for the Google Maps Route Optimization V1 Client class Location.\n\nEncapsulates a location (a geographic point, and an optional heading).\n\nGenerated from protobuf message `google.maps.routeoptimization.v1.Location`\n\nNamespace\n---------\n\nGoogle \\\\ Maps \\\\ RouteOptimization \\\\ V1\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getLatLng\n\nThe waypoint's geographic coordinates.\n\n### hasLatLng\n\n### clearLatLng\n\n### setLatLng\n\nThe waypoint's geographic coordinates.\n\n### getHeading\n\nThe compass heading associated with the direction of the flow of traffic.\n\nThis value is used to specify the side of the road to use for pickup and\ndrop-off. Heading values can be from 0 to 360, where 0 specifies a heading\nof due North, 90 specifies a heading of due East, etc.\n\n### hasHeading\n\n### clearHeading\n\n### setHeading\n\nThe compass heading associated with the direction of the flow of traffic.\n\nThis value is used to specify the side of the road to use for pickup and\ndrop-off. Heading values can be from 0 to 360, where 0 specifies a heading\nof due North, 90 specifies a heading of due East, etc."]]