Google Maps Route Optimization V1 Client - Class Location (0.2.0)

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

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

Generated from protobuf message google.maps.routeoptimization.v1.Location

Namespace

Google \ Maps \ RouteOptimization \ V1

Methods

__construct

Constructor.

Parameters
Name Description
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
Type Description
Google\Type\LatLng|null

hasLatLng

clearLatLng

setLatLng

The waypoint's geographic coordinates.

Parameter
Name Description
var Google\Type\LatLng
Returns
Type Description
$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
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.

Parameter
Name Description
var int
Returns
Type Description
$this