Class: LineRouteStyle

alk.style.LineRouteStyle

An instance of this class provides a ol.style.StyleFunction for the alk.layer.MultiRoutingLayer that only draws route lines of a designated stroke style.

new alk.style.LineRouteStyle(opt_options)

This constructor creates a Style Function for styling the alk.layer.MultiRoutingLayer.

This style ignores styling for any Stops and they will not be rendered.

All Features pertaining the RoutingLayer will have the 'routeId' property set. Paths: These are features with LineString and MultiLineString geometries. Stops: These features will have the following properties set: 'stop' : (Array.) contains the original coordinates of the stop. 'stopIndex' : (number) contains a [0,n) index in the presented stops. 'stopType' : (alk.val.StopType|undefined).

Features tagged with 'stop' may also be tagged with 'stopType' of ol.val.StopType according to the policy set forth in the RoutingLayer. For instance, a Route with 'hubRouting' set will not have a 'stop' feature with a 'stopType' of 'Destination'.

Name Type Description
options Object

Subclasses

Extends

Members

layer{ol.layer.Vector}

Methods

getStrokeStyle(feature, resolution){ol.style.Stroke}

This function returns the stroke style for the route.

Name Type Description
feature ol.Feature
resolution number

getUpdateStrokeStyle(feature, resolution){ol.style.Stroke}

This function returns the Update Stroke Style, which is the same for all features and resolutions.

Name Type Description
feature ol.Feature

This argument is ignored.

resolution number

This argument is ignored.

setStrokeStyle(strokeStyle)

This function sets the stroke style for this LineRouteStyle.

Name Type Description
strokeStyle ol.style.Stroke

setUpdateStrokeStyle(stroke)

This function sets the update stroke style.

Name Type Description
stroke ol.style.Stroke

setUpdating(value) inherited

This method is called when the 'updating' property of alk.layer.RoutingLayer is changed. This call gives the style the ability to style things differently when being updated.

Name Type Description
value boolean

styleFunction(feature, resolution){Array.<ol.style.Style>}

Name Type Description
feature ol.Feature
resolution number