Class: SingleRoadSurfaceRoute

alk.source.SingleRoadSurfaceRoute

An instance of this class provides a ol.source.Vector source for the alk.layer.RoadSurfaceRouteLayer.

new alk.source.SingleRoadSurfaceRoute(opt_options)

This constructor creates a Vector Source for the ALK Road Surface Route Layer.

Option Type Description
roadSurfaceRouteServiceOptions alkx.RoadSurfaceRouteServiceOptions | undefined

This option contains the options that are given to the underlying alk.service.RoadSurfaceRouteService to create the route.

Fires:
change:request
Fires the 'change:request' event when done processing the response.
change:updating
Fires the 'change:updating' event on the begin and end of updating.

Extends

Methods

clear()

This method removes all the features from the source.

cloneRoadSurfaceRouteServiceOptions(options){alkx.RoadSurfaceRouteServiceOptions} inherited

This method processes clones the RoadSurfaceRouteServiceOptions including a deep copy of the of the 'routePath' property.

Option Type Description
apiKey string

This option contains the ALK ApiKey that gives you permission to extract data from ALK Servers.

dataset alk.val.Dataset | number | string

The option contains the Dataset parameter for the Service. This option specifies an area dataset that may be pertinent to the request.

region alk.val.Region | number | string

This option tells the service in which region the retrieved data is to pertain. Some ALK Services switch underlying services due to this option. For instance, traffic data for North America and Europe may come from different underlying services.

hostURL string

This option contains the the host and port URL for the particular service. This option is not set by the user, but is automatically generated from the particular service being used.

path string

This option is the path part of the URL for the particular service. This option is not set by the user, but is automatically generated from the particular service being used.

hourOffset number | string

This option tells the service the hour offset in which to return image data or tiles. TODO: Better description.

provider alk.val.Provider | number | string

This option tells the service the provider in which to return image data or tiles. The options are Default or RC1.

routePath Array.<Array.<number>>

This option tells the service the route for which to get the road conditions.

routeDuration number | string

This option tells the service the duration route for which to get the road conditions.

Returns:
The cloned object.

getRoadSurfaceRouteService(){alk.service.RoadSurfaceRouteService} inherited

setRoadSurfaceRouteService(service) inherited

Name Type Description
service alk.service.RoadSurfaceRouteService

setRoute(options, complete)

This method uses the given options to make the call to the underlying RoadSurfaceRouteService. The response is taken from the RoadSurfaceRouteService call and handed off to alk.source.SingleRoadSurfaceRoute#processResponse before being given to the 'complete' callback given here.

One may give this method an Array of RoadSurfaceRouteService parameter specifications. Separate requests to the underlying RoadSurfaceRouteService will be made. This situation may be used to map disconnected routePaths. Also, for a hub routing situation where each leg is treated as a route up to a stop and back to the hub is a prime use of using an array.

Giving only one route specification object is equivalent to giving a one element array. The complete call back will always be given an array of responses, and the 'request' attribute will contain an array as well.

After each response is returned from the server and given to processResponse, its feature collection is added to the source.

If multiple requests are made, the complete callback is called only after they all return, whether it is an error or not.

Name Type Description
options Array.<alkx.RoadSurfaceRouteServiceOptions> | alkx.RoadSurfaceRouteServiceOptions
Option Type Description
apiKey string

This option contains the ALK ApiKey that gives you permission to extract data from ALK Servers.

dataset alk.val.Dataset | number | string

The option contains the Dataset parameter for the Service. This option specifies an area dataset that may be pertinent to the request.

region alk.val.Region | number | string

This option tells the service in which region the retrieved data is to pertain. Some ALK Services switch underlying services due to this option. For instance, traffic data for North America and Europe may come from different underlying services.

hostURL string

This option contains the the host and port URL for the particular service. This option is not set by the user, but is automatically generated from the particular service being used.

path string

This option is the path part of the URL for the particular service. This option is not set by the user, but is automatically generated from the particular service being used.

hourOffset number | string

This option tells the service the hour offset in which to return image data or tiles. TODO: Better description.

provider alk.val.Provider | number | string

This option tells the service the provider in which to return image data or tiles. The options are Default or RC1.

routePath Array.<Array.<number>>

This option tells the service the route for which to get the road conditions.

routeDuration number | string

This option tells the service the duration route for which to get the road conditions.

complete function
Fires:
change:request
Fires the 'change:request' event when done processing the response.
change:updating
Fires the 'change:updating' event on the begin and end of updating.