Class

DefaultRouteStopIconProvider

mapsindoors.directions.DefaultRouteStopIconProvider(options)

Represents a provider for route stop icons.

Constructor

# new DefaultRouteStopIconProvider(options)

Creates a new instance of RouteStopIconProvider.

Parameters:
Name Type Attributes Default Description
options Object

The options for the icon provider.

fillColor string

The fill color of the icon. Default is '#ef4444'.

numbered boolean

Indicates whether the icon should be numbered. Default is true.

iconUrl string <optional>

Custom stop icon URL. When set, it replaces the drawn numbered pin.

scale number <optional>
1

Scale multiplier: stops render at 24 × scale CSS px wide, regardless of the source image's natural size.

Implements:

Members

# scale

The scale multiplier the renderer applies on the 24 px base size.

Methods

# getImage(stopNumberopt) → {Promise:.<(HTMLImageElement:|null:)>}

Gets the icon for the specified stop number.

Parameters:
Name Type Attributes Description
stopNumber number <optional>

The stop number.

Implements:
  • The icon image, or null when a custom icon fails to load.
Promise:.<(HTMLImageElement:|null:)>