Type Definitions
- 
    
FlatCircle{Object}
 - 
    
Circle style properties for rendering point features. At least
circle-radiusmust be provided.Properties:
Name Type Argument Default Description circle-radiusnumber <optional> 
Circle radius.
circle-fill-colorColor | ColorLike <optional> 
The fill color.
circle-stroke-colorColor | ColorLike <optional> 
The stroke color.
circle-stroke-widthnumber <optional> 
Stroke pixel width.
circle-stroke-line-capCanvasLineCap <optional> 
'round' Line cap style:
butt,round, orsquare.circle-stroke-line-joinCanvasLineJoin <optional> 
'round' Line join style:
bevel,round, ormiter.circle-stroke-line-dashArray.<number> <optional> 
Line dash pattern.
circle-stroke-line-dash-offsetnumber <optional> 
0 Line dash offset.
circle-stroke-miter-limitnumber <optional> 
10 Miter limit.
circle-displacementArray.<number> <optional> 
[0,0] displacement
circle-scalenumber | Size <optional> 
1 Scale. A two dimensional scale will produce an ellipse. Unless two dimensional scaling is required a better result may be obtained with an appropriate setting for
circle-radius.circle-rotationnumber <optional> 
0 Rotation in radians (positive rotation clockwise, meaningful only when used in conjunction with a two dimensional scale).
circle-rotate-with-viewboolean <optional> 
false Whether to rotate the shape with the view (meaningful only when used in conjunction with a two dimensional scale).
circle-declutter-mode"declutter" | "obstacle" | "none" | undefined <optional> 
Declutter mode
 - 
    
FlatFill{Object}
 - 
    
Fill style properties applied to polygon features.
 - 
    
FlatIcon{Object}
 - 
    
Icon style properties applied to point features. One of
icon-srcoricon-imgmust be provided to render points with an icon.Properties:
Name Type Argument Default Description icon-srcstring <optional> 
Image source URI.
icon-imgHTMLImageElement | HTMLCanvasElement <optional> 
Image object for the icon. If the
icon-srcoption is not provided then the provided image must already be loaded. And in that case, it is required to provide the size of the image, with theicon-img-sizeoption.icon-img-sizeSize <optional> 
Image size in pixels. Only required if
icon-imgis set andicon-srcis not. The provided size needs to match the actual size of the image.icon-anchorArray.<number> <optional> 
[0.5, 0.5] Anchor. Default value is the icon center.
icon-anchor-originIconOrigin <optional> 
'top-left' Origin of the anchor:
bottom-left,bottom-right,top-leftortop-right.icon-anchor-x-unitsIconAnchorUnits <optional> 
'fraction' Units in which the anchor x value is specified. A value of
'fraction'indicates the x value is a fraction of the icon. A value of'pixels'indicates the x value in pixels.icon-anchor-y-unitsIconAnchorUnits <optional> 
'fraction' Units in which the anchor y value is specified. A value of
'fraction'indicates the y value is a fraction of the icon. A value of'pixels'indicates the y value in pixels.icon-colorColor | string <optional> 
Color to tint the icon. If not specified, the icon will be left as is.
icon-cross-originnull | string <optional> 
The
crossOriginattribute for loaded images. Note that you must provide aicon-cross-originvalue if you want to access pixel data with the Canvas renderer. See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.icon-offsetArray.<number> <optional> 
[0, 0] Offset, which, together with the size and the offset origin, define the sub-rectangle to use from the original icon image.
icon-displacementArray.<number> <optional> 
[0,0] Displacement of the icon.
icon-offset-originIconOrigin <optional> 
'top-left' Origin of the offset:
bottom-left,bottom-right,top-leftortop-right.icon-opacitynumber <optional> 
1 Opacity of the icon.
icon-scalenumber | Size <optional> 
1 Scale.
icon-rotationnumber <optional> 
0 Rotation in radians (positive rotation clockwise).
icon-rotate-with-viewboolean <optional> 
false Whether to rotate the icon with the view.
icon-sizeSize <optional> 
Icon size in pixel. Can be used together with
icon-offsetto define the sub-rectangle to use from the origin (sprite) icon image.icon-declutter-mode"declutter" | "obstacle" | "none" | undefined <optional> 
Declutter mode
 - 
    
FlatShape{Object}
 - 
    
Regular shape style properties for rendering point features. At least
shape-pointsmust be provided.Properties:
Name Type Argument Default Description shape-pointsnumber <optional> 
Number of points for stars and regular polygons. In case of a polygon, the number of points is the number of sides.
shape-fill-colorColor | ColorLike <optional> 
The fill color.
shape-stroke-colorColor | ColorLike <optional> 
The stroke color.
shape-stroke-widthnumber <optional> 
Stroke pixel width.
shape-stroke-line-capCanvasLineCap <optional> 
'round' Line cap style:
butt,round, orsquare.shape-stroke-line-joinCanvasLineJoin <optional> 
'round' Line join style:
bevel,round, ormiter.shape-stroke-line-dashArray.<number> <optional> 
Line dash pattern.
shape-stroke-line-dash-offsetnumber <optional> 
0 Line dash offset.
shape-stroke-miter-limitnumber <optional> 
10 Miter limit.
shape-radiusnumber <optional> 
Radius of a regular polygon.
shape-radius1number <optional> 
First radius of a star. Ignored if radius is set.
shape-radius2number <optional> 
Second radius of a star.
shape-anglenumber <optional> 
0 Shape's angle in radians. A value of 0 will have one of the shape's point facing up.
shape-displacementArray.<number> <optional> 
[0,0] Displacement of the shape
shape-rotationnumber <optional> 
0 Rotation in radians (positive rotation clockwise).
shape-rotate-with-viewboolean <optional> 
false Whether to rotate the shape with the view.
shape-scalenumber | Size <optional> 
1 Scale. Unless two dimensional scaling is required a better result may be obtained with appropriate settings for
shape-radius,shape-radius1andshape-radius2.shape-declutter-mode"declutter" | "obstacle" | "none" | undefined <optional> 
Declutter mode.
 - 
    
FlatStroke{Object}
 - 
    
Stroke style properties applied to line strings and polygon boundaries. To apply a stroke, at least one of
stroke-colororstroke-widthmust be provided.Properties:
Name Type Argument Default Description stroke-colorColor | ColorLike <optional> 
The stroke color.
stroke-widthnumber <optional> 
Stroke pixel width.
stroke-line-capCanvasLineCap <optional> 
'round' Line cap style:
butt,round, orsquare.stroke-line-joinCanvasLineJoin <optional> 
'round' Line join style:
bevel,round, ormiter.stroke-line-dashArray.<number> <optional> 
Line dash pattern.
stroke-line-dash-offsetnumber <optional> 
0 Line dash offset.
stroke-miter-limitnumber <optional> 
10 Miter limit.
 - 
    
FlatStyle{FlatFill} {FlatStroke} {FlatText} {FlatIcon} {FlatShape} {FlatCircle}
 - 
    
For static styling, the
layer.setStyle()method can be called with an object literal that has fill, stroke, text, icon, regular shape, and/or circle properties. - 
    
FlatStyleLike{FlatStyle} {Array<FlatStyle>}
 - 
    
A flat style literal or an array of the same.
 - 
    
FlatText{Object}
 - 
    
Label style properties applied to all features. At a minimum, a
text-valuemust be provided.Properties:
Name Type Argument Default Description text-valuestring | Array.<string> <optional> 
Text content or rich text content. For plain text provide a string, which can contain line breaks (
\n). For rich text provide an array of text/font tuples. A tuple consists of the text to render and the font to use (or''to use the text style's font). A line break has to be a separate tuple (i.e.'\n', ''). Example:['foo', 'bold 10px sans-serif', ' bar', 'italic 10px sans-serif', ' baz', '']will yield "foo bar baz". Note: Rich text is not supported for the immediate rendering API.text-fontstring <optional> 
Font style as CSS
fontvalue, see: https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/font. Default is'10px sans-serif'text-max-anglenumber <optional> 
Math.PI/4 When
text-placementis set to'line', allow a maximum angle between adjacent characters. The expected value is in radians, and the default is 45° (Math.PI / 4).text-offset-xnumber <optional> 
0 Horizontal text offset in pixels. A positive will shift the text right.
text-offset-ynumber <optional> 
0 Vertical text offset in pixels. A positive will shift the text down.
text-overflowboolean <optional> 
false For polygon labels or when
placementis set to'line', allow text to exceed the width of the polygon at the label position or the length of the path that it follows.text-placementTextPlacement <optional> 
'point' Text placement.
text-repeatnumber <optional> 
Repeat interval in pixels. When set, the text will be repeated at this interval. Only available when
text-placementis set to'line'. Overridestext-align.text-scalenumber | Size <optional> 
Scale.
text-rotate-with-viewboolean <optional> 
false Whether to rotate the text with the view.
text-rotationnumber <optional> 
0 Rotation in radians (positive rotation clockwise).
text-alignCanvasTextAlign <optional> 
Text alignment. Possible values:
'left','right','center','end'or'start'. Default is'center'fortext-placement: 'point'. Fortext-placement: 'line', the default is to let the renderer choose a placement wheretext-max-angleis not exceeded.text-justifyTextJustify <optional> 
Text justification within the text box. If not set, text is justified towards the
textAlignanchor. Otherwise, use options'left','center', or'right'to justify the text within the text box. Note:text-justifyis ignored for immediate rendering and also fortext-placement: 'line'.text-baselineCanvasTextBaseline <optional> 
'middle' Text base line. Possible values:
'bottom','top','middle','alphabetic','hanging','ideographic'.text-paddingArray.<number> <optional> 
[0, 0, 0, 0] Padding in pixels around the text for decluttering and background. The order of values in the array is
[top, right, bottom, left].text-fill-colorColor | ColorLike <optional> 
The fill color.
text-background-fill-colorColor | ColorLike <optional> 
The fill color.
text-stroke-colorColor | ColorLike <optional> 
The stroke color.
text-stroke-line-capCanvasLineCap <optional> 
'round' Line cap style:
butt,round, orsquare.text-stroke-line-joinCanvasLineJoin <optional> 
'round' Line join style:
bevel,round, ormiter.text-stroke-line-dashArray.<number> <optional> 
Line dash pattern.
text-stroke-line-dash-offsetnumber <optional> 
0 Line dash offset.
text-stroke-miter-limitnumber <optional> 
10 Miter limit.
text-stroke-widthnumber <optional> 
Stroke pixel width.
text-background-stroke-colorColor | ColorLike <optional> 
The stroke color.
text-background-stroke-line-capCanvasLineCap <optional> 
'round' Line cap style:
butt,round, orsquare.text-background-stroke-line-joinCanvasLineJoin <optional> 
'round' Line join style:
bevel,round, ormiter.text-background-stroke-line-dashArray.<number> <optional> 
Line dash pattern.
text-background-stroke-line-dash-offsetnumber <optional> 
0 Line dash offset.
text-background-stroke-miter-limitnumber <optional> 
10 Miter limit.
text-background-stroke-widthnumber <optional> 
Stroke pixel width.