Create a vector layer for drawing road surface condition for routes.
ALKMaps. | Create 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. | Create a vector layer for drawing road surface conditions for routes. |
Functions | |
onStartCallback | Callback function that user can override for handling adding route event. |
onAddedCallback | Callback function that user can override for handling route added event. |
onErrorCallback | Callback function that user can override for handling adding route error. |
addRoutePath | Adds a route to visualize it with road surface condition. |
visualizeRoutes | Shows all routes from the routing layer with road surface conditions. |
Create a vector layer for drawing road surface conditions for routes.
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. |
{ALKMaps.Layer.RoadSurfaceRoute} A new vector layer for drawing road surface conditions for routes.
addRoutePath: function( routeId, routeElements, routeDuration )
Adds a route to visualize it with road surface condition.
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: function( routingLayer, routeDurations )
Shows all routes from the routing layer with road surface conditions.
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. |
Callback function that user can override for handling adding route event.
onStartCallback: function( evt )
Callback function that user can override for handling route added event.
onAddedCallback: function( evt )
Callback function that user can override for handling adding route error.
onErrorCallback: function( evt )
Adds a route to visualize it with road surface condition.
addRoutePath: function( routeId, routeElements, routeDuration )
Shows all routes from the routing layer with road surface conditions.
visualizeRoutes: function( routingLayer, routeDurations )