Class: IconLib

nyc/ol/style/IconLib~ IconLib


new IconLib( [url])

Class to load icons from a library

Parameters:
Name Type Argument Description
url url <optional>

The URL to the icon library

Source:

Members


<static, constant> LIBRARIES :string

Type:
  • string
Source:

<static, constant> NOT_FOUND_ICON :Object

Default icon when requested icon is unavailable

Type:
  • Object
Source:

Methods


style(options [, style])

Create an icon style

Parameters:
Name Type Argument Description
options module:nyc/ol/style/IconLib~IconLib.Icon

The style options

style ol.style.Style <optional>

The style on which to set the icon image

Source:
Returns:

The icon style

Type
ol.style.Style

Type Definitions


Icon

Icon definition object

Type:
  • Object
Properties:
Name Type Description
library string

The icon library

name string

The icon name

fill string

The icon fill color

stroke module:nyc/ol/style/IconLib~IconLib.Stroke

The icon stroke

Source:

Stroke

Icon definition object

Type:
  • Object
Properties:
Name Type Description
width number

The width

color string

The stroke color

Source:

StyleOptions

Type:
  • Object
Properties:
Name Type Argument Description
icon string | module:nyc/ol/style/IconLib~IconLib.Icon

The icon

width number

The icon width

fill string <optional>

An override color for the icon

stroke module:nyc/ol/style/IconLib~IconLib.Stroke <optional>

An override color for the stroke

Source: