new alk.style.ArrowsRouteStyle(opt_options)
This constructor creates a Style object that styles any route features
having a geometry of {ol.geom.Point} such that they will be tagged
with 'stop' and 'stopIndex' if they are stops. The 'stop' property will
have the original coordinates, and the 'stopIndex' property will have
the index in the stop list given to the RoutingLayer#addRoute function.
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'.
This particular ArrowsRouteStyle assigns styles for a particular 'routeId from a set of rotating strokes
from a alk.style.StrokeQueue.
If the arrows option is set to Line, arrows are drawn along the route at regular
intervals. If the arrows option is set to End, a single arrow is drawn at the end.
| Name | Type | Description |
|---|---|---|
options |
Object |
Extends
Members
-
layer{ol.layer.Vector}
-
Methods
-
clearStrokeForRouteId(routeId) inherited
-
This function clears the assigned, if any, stroke style for the given routeId identifier.
Name Type Description routeIdstring -
defaultDestinationImage(){ol.style.Image} inherited
-
This function returns the default style for a stop feature with the feature's 'stopType' property of
alk.val.StopType.Destination.For this implementation, the defaultOriginImage is used for all stopTypes of
alk.val.StopType.Destinationregardless of the route's stroke color. -
defaultOriginImage(){ol.style.Image} inherited
-
This function returns the default image for a stop feature with the feature's 'stopType' property of
alk.val.StopType.Origin.For this implementation, the defaultOriginImage is used for all stopTypes of
alk.val.StopType.Originregardless of the route's stroke color. -
defaultViaPointImage(){ol.style.Image} inherited
-
This function returns the default image for a stop feature with the feature's 'stopType' property of
alk.val.StopType.ViaPoint.For this implementation, the defaultOriginImage is used for all stopTypes of
alk.val.StopType.Originregardless of the route's stroke color. -
defaultWayPointImage(){ol.style.Image} inherited
-
This function returns the default image for a stop feature with the feature's 'stopType' property of
alk.val.StopType.WayPoint.For this implementation, the defaultOriginImage is NOT used. The
alk.style.StopsRouteStyle#getWayPointImagereturns a different image according to the route's stroke color. -
getArrow(feature, resolution, strokeStyle, bearing){ol.style.Image|null}
-
This function returns an
ol.style.Imageto use as an arrow. It is only called once per feature. The feature will be a MultiLineString or LineString geometry and will have its 'routeId' property set. However, the strokeStyle is associated with the 'routeId'.Name Type Description featureol.Feature The feature we are drawing arrows on.
resolutionnumber The resolution
strokeStyleol.style.Stroke The selected stroke style for the route.
bearingnumber The bearing to which the arrow should point. Usually used in the 'rotation' property.
Returns:
If this returns null, no arrows will be drawn.
-
getDestinationImage(stroke){ol.style.Image} inherited
-
This function returns the image to use in styling a stop feature with the feature's 'stopType' property of
alk.val.StopType.Destination.This implementation ignores the stroke style and returns the
alk.style.StopsRouteStyle#defaultDestinationImage.Name Type Description strokeol.style.Stroke The route's stroke style.
-
getDestinationStyleFunction(feature, resolution){ol.style.Style|null} inherited
-
This style function returns a style for a stop with the feature's 'stopType' property of
alk.val.StopType.Destination.This implementation returns a style containing the image returned by
alk.style.StopsRouteStyle#getDestinationImage.Name Type Description featureol.Feature The stop feature
resolutionnumber -
getOriginImage(stroke){ol.style.Image} inherited
-
This function returns the image to use in styling a stop feature with the feature's 'stopType' property of
alk.val.StopType.Origin.This implementation ignores the stroke style and returns the default origin image.
Name Type Description strokeol.style.Stroke The route's stroke style.
-
getOriginStyleFunction(feature, resolution){ol.style.Style|null} inherited
-
This function returns the
ol.style.Stylestop feature with the feature's 'stopType' property set toalk.val.StopType.Origin.Name Type Description featureol.Feature The stop feature
resolutionnumber -
getStopStyle(feature, resolution){ol.style.Style|null} inherited
-
This function returns an
ol.style.Stylethat styles a stop feature. The feature will be a Point geometry and will have its 'routeId', 'stop', 'stopIndex', and 'stopType', and 'logicalStopIndex' properties set.This implementation calls out
getOriginStyleFunction,getWayPointStyleFunction,getViaPointStyleFunction, andgetDestinationStyleFunction, for each of the stop features.Name Type Description featureol.Feature The stop feature.
resolutionnumber The display resolution.
Returns:
If this returns null, no stop will be drawn.
-
getStrokeQueue(){alk.style.StrokeQueue|undefined} inherited
-
This function returns the stroke Queue.
-
getStrokeStyle(feature, resolution){ol.style.Stroke} inherited
-
This function returns the stroke style for the route.
Name Type Description featureol.Feature resolutionnumber -
getUpdateStrokeStyle(feature, resolution){ol.style.Stroke} inherited
-
This function returns the Update Stroke Style, which is the same for all features and resolutions.
Name Type Description featureol.Feature This argument is ignored.
resolutionnumber This argument is ignored.
-
getViaPointImage(stroke){ol.style.Image} inherited
-
This function returns the image to use in styling a stop feature with the feature's 'stopType' property of
alk.val.StopType.ViaPoint.This implementation ignores the stroke style and returns the value from
alk.style.StopsRouteStyle#defaultViaPointImage.Name Type Description strokeol.style.Stroke The route's stroke style.
-
getViaPointStyleFunction(feature, resolution){ol.style.Style|null} inherited
-
This style function returns a style for a stop feature with the feature's 'stopType' property of
alk.val.StopType.ViaPoint.This implementation returns a style containing the image returned by
alk.style.StopsRouteStyle#getViaPointImage.Name Type Description featureol.Feature The stop feature
resolutionnumber -
getWayPointImage(stroke){ol.style.Image} inherited
-
This function returns the image to use in styling a stop feature with the feature's 'stopType' property of
alk.val.StopType.WayPoint.This implementation returns a
ol.style.Circlestyled with a white fill, and a color border of the route's stroke color. The width of the stroke is 3 pixels, and the radius of the circle is 9 pixels. The stroke color is 1.0 opacity equivalent to the route's stroke color, which should be at 0.5 opacity.Name Type Description strokeol.style.Stroke The route's stroke style.
-
getWayPointStyleFunction(feature, resolution){ol.style.Style|null} inherited
-
This style function returns a style for a stop feature with the feature's 'stopType' property of
alk.val.StopType.WayPoint.This implementation returns the image returned by
alk.style.StopsRouteStyle#getWayPointImage, superimposed with a index corresponding to the feature's 'logicalStopIndex' property. The index is a letter or number based on whether the feature's 'hubRouting' property is set to true, or not, respectively.Name Type Description featureol.Feature The stop feature
resolutionnumber -
setStrokeQueue(strokeQueue) inherited
-
This function sets the stroke style for this QueuedLineRouteStyle.
Name Type Description strokeQueuealk.style.StrokeQueue -
setStrokeStyle(strokeStyle) inherited
-
This function sets the stroke style for this LineRouteStyle.
Name Type Description strokeStyleol.style.Stroke -
setUpdateStrokeStyle(stroke) inherited
-
This function sets the update stroke style.
Name Type Description strokeol.style.Stroke -
setUpdating(value) inherited
-
This method is called when the 'updating' property of
alk.layer.RoutingLayeris changed. This call gives the style the ability to style things differently when being updated.Name Type Description valueboolean -
styleFunction(feature, resolution){Array.<ol.style.Style>}
-
Name Type Description featureol.Feature resolutionnumber