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 optionsmodule:nyc/ol/style/IconLib~IconLib.Icon The style options
styleol.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
- Source:
Properties:
Name Type Description librarystring The icon library
namestring The icon name
fillstring The icon fill color
strokemodule:nyc/ol/style/IconLib~IconLib.Stroke The icon stroke
-
Stroke
-
Icon definition object
Type:
- Object
- Source:
Properties:
Name Type Description widthnumber The width
colorstring The stroke color
-
StyleOptions
-
Option for module:nyc/ol/style/IconLib~IconLib#style
Type:
- Object
- Source:
Properties:
Name Type Argument Description iconstring | module:nyc/ol/style/IconLib~IconLib.Icon The icon
widthnumber The icon width
fillstring <optional>
An override color for the icon
strokemodule:nyc/ol/style/IconLib~IconLib.Stroke <optional>
An override color for the stroke