new FontSymbol(options)
Parameters:
Name | Type | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Options. Properties
|
- Implements:
- ol.structs.IHasChecksum
Extends
- ol.style.RegularShape
Members
-
<static> defs
-
Font defs
Methods
-
<static> addDefs(font, glyphs)
-
Static function : add new font defs
Parameters:
Name Type Description font
String | Object the font name or a description ({ font: font_name, name: font_name, copyright: '', prefix })
glyphs
Object a key / value list of glyph definitions. Each key is the name of the glyph, the value is an object that code the font, the caracter code, the name and a search string for the glyph. { char: the char, code: the char code (if no char), theme: a theme for search puposes, name: the symbol name, search: a search string (separated with ',') }
-
clone()
-
Clones the style.
Returns:
- Type
- ol.style.FontSymbol
-
getChecksum()
-
-
getFill()
-
Get the fill style for the symbol.
Returns:
Fill style.
- Type
- ol.style.Fill
-
getFontInfo()
-
Get the stroke style for the symbol.
Returns:
Stroke style.
- Type
- _ol_style_Stroke_
-
getGlyph(name)
-
Get the glyph definition for the symbol.
Parameters:
Name Type Description name
string | undefined a glyph name to get the definition, default return the glyph definition for the style.
Returns:
- Type
- *
-
getGlyphName()
-
Get the glyph name.
Returns:
the name
- Type
- string
-
getImage(pixelRatio)
-
Get the image icon.
Parameters:
Name Type Description pixelRatio
number Pixel ratio.
Returns:
Image or Canvas element.
- Type
- HTMLCanvasElement
-
getStroke()
-
Get the stroke style for the symbol.
Returns:
Stroke style.
- Type
- _ol_style_Stroke_
-
getTextGlyph(text [, font])
-
Get glyph definition given a text and a font
Parameters:
Name Type Argument Description text
string | undefined font
string <optional>
the font for the text
Returns:
- Type
- *