ALKMaps.Layer.RoadSurfaceRoute

Create a vector layer for drawing road surface condition for routes.

Inherits from

Summary
ALKMaps.Layer.RoadSurfaceRouteCreate a vector layer for drawing road surface condition for routes.
Properties
routeLookup{Array(Object)} List of routeId key value pairs.
provider{String} Default is “RC1”.
Constructor
ALKMaps.Layer.RoadSurfaceRouteCreate a vector layer for drawing road surface conditions for routes.
Functions
onStartCallbackCallback function that user can override for handling adding route event.
onAddedCallbackCallback function that user can override for handling route added event.
onErrorCallbackCallback function that user can override for handling adding route error.
addRoutePathAdds a route to visualize it with road surface condition.
visualizeRoutesShows all routes from the routing layer with road surface conditions.

Properties

routeLookup

{Array(Object)} List of routeId key value pairs.  After a route is added, the route ID is added to the list.

provider

{String} Default is “RC1”.

Constructor

ALKMaps.Layer.RoadSurfaceRoute

Create a vector layer for drawing road surface conditions for routes.

Parameters

name{String} unique name of the layer.
params{Object} properties to set on this layer.  User can provide styleMap object to override the default one.

Returns

{ALKMaps.Layer.RoadSurfaceRoute} A new vector layer for drawing road surface conditions for routes.

Functions

onStartCallback

onStartCallback: function(evt)

Callback function that user can override for handling adding route event.

Parameters

evt{Object} has routeId property.

onAddedCallback

onAddedCallback: function(evt)

Callback function that user can override for handling route added event.

Parameters

evt{Object} has routeId property.

onErrorCallback

onErrorCallback: function(evt)

Callback function that user can override for handling adding route error.

Parameters

evt{Object} has routeId and response properties.

addRoutePath

addRoutePath: function(routeId,
routeElements,
routeDuration)

Adds a route to visualize it with road surface condition.

Parameters

routeId{String} Route unique ID.  Required.
routeElements{Object} One way to set this parameter is by calling getRouteElements method with a given route ID on {ALKMaps.Layer.Routing} layer.  Required.
routeDuration{Number} The duration of the route in minutes (integer).  It is used to calculate the temporal offset for each point in the route path.  Optional.

visualizeRoutes

visualizeRoutes: function(routingLayer,
routeDurations)

Shows all routes from the routing layer with road surface conditions.

Parameters

routingLayer{ALKMaps.Layer.Routing}
routeDurations{Array(Object)} Optional.  The object has routeId as String and duration as Number properties.  routeId: route Id.  duration: route duration in minutes.  If 0 or null value is supplied, current road surface condition will be shown for the entire route.
onStartCallback: function(evt)
Callback function that user can override for handling adding route event.
onAddedCallback: function(evt)
Callback function that user can override for handling route added event.
onErrorCallback: function(evt)
Callback function that user can override for handling adding route error.
addRoutePath: function(routeId,
routeElements,
routeDuration)
Adds a route to visualize it with road surface condition.
visualizeRoutes: function(routingLayer,
routeDurations)
Shows all routes from the routing layer with road surface conditions.
Instances of ALKMaps.Layer.Vector are used to render vector data from a variety of sources.
Create a vector layer for drawing road surface conditions for routes.
Create a vector layer for drawing and managing route objects.
Close