Class: FontSymbol

ol.style. FontSymbol

A marker style to use with font symbols.


new FontSymbol(options)

Parameters:
Name Type Description
options

Options.

Properties
Name Type Description
glyph number

the glyph name or a char to display as symbol. The name must be added using the ol.style.FontSymbol.addDefs function.

form string

none|circle|poi|bubble|marker|coma|shield|blazon|bookmark|hexagon|diamond|triangle|sign|ban|lozenge|square a form that will enclose the glyph, default none

radius number
rotation number
rotateWithView number
opacity number
fontSize, number

default 1

fontStyle string

the font style (bold, italic, bold italic, etc), default none

gradient boolean

true to display a gradient on the symbol

fill _ol_style_Fill_
stroke _ol_style_Stroke_
Implements:
  • ol.structs.IHasChecksum

Extends

  • ol.style.RegularShape

Members


defs

Font defs

Methods


<static> addDefs(font, glyphs)

Static function : add new font defs

Parameters:
Name Type Description
font String | Object

the font desciption

glyphs

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.


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:

Stroke style.

Type
_ol_style_Stroke_

getGlyphName()

Get the glyph name.

Returns:

the name

Type
string

getStroke()

Get the stroke style for the symbol.

Returns:

Stroke style.

Type
_ol_style_Stroke_