GEOCODING & SEARCH
REST
Android
iOS
DIRECTIONS & NAVIGATION
REST
JavaScript
Android
iOS
POSITIONING
Overview
ILP SDKs

Class: GSSDirectionsRequest

GSSDirectionsRequest(origin, destination)

Return a direction query URL to be sent to the GSSDirectionsService.

Constructor

new GSSDirectionsRequest(origin, destination)

Parameters:
Name Type Description
origin GSSLatLng

Latitude of the position.

destination GSSLatLng

Longitude of the position.

Example

GSSDirectionsRequest instantiation.

var origin = new gssdirections.GSSLatLng(33.66851327953566, -117.69093392928296);
var destination = new gssdirections.GSSLatLng(33.66465898962947, -117.67896527952263);
var directionDisplay = new gssdirections.GSSDirectionsRequest(origin, destination);

Methods

setAvoids(avoid)

Sets the vehicle type that will be travelling the route. Valid vehicle values are "hov", "toll", "highway", "uturn", "unpaved", "ferry" and "none".

Parameters:
Name Type Description
avoid Array.<String>

Optional: If not set, defaults to hov.

setDestination(destination)

Sets the destination.

Parameters:
Name Type Description
destination GSSLatLng

Latitude and Longitude of the destination location.

setOptimize(optimize)

Sets the optimization method for the route. Valid optimize values are "fastest", "shortest" and "easiest"

Parameters:
Name Type Description
optimize String

Optional: If not set, defaults to fastest.

setOrigin(origin)

Sets the origin.

Parameters:
Name Type Description
origin GSSLatLng

Latitude and Longitude of the origin location.

setTrafficOption(avoid)

Sets the traffic alert type to consider while finding the route. Valid traffic options are "none", "avoid" and "alert".

Parameters:
Name Type Description
avoid String

Optional: If not set, defaults to hov.

setVehicle(vehicle)

Sets the vehicle type that will be travelling the route. Valid vehicle values are "car", "truck", "bicycle", "pedestrian" and "easiest"

Parameters:
Name Type Description
vehicle String

Optional: If not set, defaults to car.