Google Cloud Optimization V1 Client - Class Location (0.4.0)

Reference documentation and code samples for the Google Cloud Optimization V1 Client class Location.

Encapsulates a location (a geographic point, and an optional heading).

Generated from protobuf message google.cloud.optimization.v1.Location

Namespace

Google \ Cloud \ Optimization \ V1

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ lat_lng Google\Type\LatLng

The waypoint's geographic coordinates.

↳ heading int

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.

getLatLng

The waypoint's geographic coordinates.

Returns
TypeDescription
Google\Type\LatLng|null

hasLatLng

clearLatLng

setLatLng

The waypoint's geographic coordinates.

Parameter
NameDescription
var Google\Type\LatLng
Returns
TypeDescription
$this

getHeading

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
TypeDescription
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.

Parameter
NameDescription
var int
Returns
TypeDescription
$this