LogoLogo
Sign upHelp CenterContactSocial
Home
Home
  • Overview
  • REST API
    • Getting started
    • Navigating maps and workspaces
    • Uploading files and URLs
    • Styling layers
    • Refreshing live data layers
    • Working with elements
    • Listening to updates using webhooks
    • API Reference
      • Authentication
      • Maps
      • Layers
      • Elements
      • Users
      • Comments
      • Embed Tokens
      • Sources
      • Projects
  • JS SDK
    • Getting started
    • General concepts
    • Controlling maps
    • Working with selection
    • Reading entities
    • Drawing elements
    • Working with layers
    • Layer filters
    • Building custom charts
    • Map interactions and viewport
    • Hiding and showing
    • Integrating with React
    • Sample application
    • Examples
    • API Reference
  • Felt Style Language
    • Getting started
    • Style definition blocks
      • The config block
      • The paint block
      • The label block
      • The legend block
      • The popup block
      • The attributes block
      • The filters block
    • Types of visualizations
      • Simple visualizations
      • Categorical visualizations
      • Numeric visualizations (color & size)
      • Heatmaps
      • Hillshade
    • Zoom-based Styling
      • Interpolators
    • Legends
    • Errors
    • Examples
Powered by GitBook
On this page
  • Default Values
  • Examples

Was this helpful?

Export as PDF
  1. Felt Style Language
  2. Style definition blocks

The config block

The config block contains configuration options for a given visualization.

These are the fields that each config block can contain:

Field name
Description

band

Optional. Used in raster numeric visualizations. The raster band that we’ll use to get the data from.

categoricalAttribute

Mandatory for categorical visualizations. The attribute that contains the categorical attributes that will be used.

categories

Mandatory for a categorical visualization. An array of the values that will be used as categories. Categories will be rendered from top to bottom following the definition order.

labelAttribute

Optional. Defines which dataset attribute or attributes to use for labeling. If multiple values are provided, the first available one will be used.

method

Optional. Used in raster algebra numeric visualizations. The type of operation and the bands used for it.

noData

Optional. Used in raster visualizations. Defines values that won’t be shown

numericAttribute

Mandatory for a numeric visualization. The attribute that contains the numeric values used.

otherOrder

Optional. Used in categorical visualizations. It can be set to either “below” or “above” to make features that do not match any of the defined categories render below or above the other ones. The default position is “below”.

rasterResampling

Optional. Used on raster data visualizations. It can be set to either “nearest” or “linear”. Defaults to “nearest”

showOther

Optional. Used in categorical visualizations. If this field is set to true it will show all features that do not match any of the defined categories and add an extra entry as the last item in the legend.

steps

Mandatory for a numeric visualization. An array of values that are either step based depending on the classification method and number of steps chosen or, for a continuous visualization, the min and max values from the numericAttribute.

Default Values

Name
Points
Polygons
Lines
Raster

rasterResampling

-

-

-

“nearest”

highlightColor

"#EA3891"

"#EA3891"

"#EA3891"

-

highlightStrokeColor

"#EA3891"

"#EA3891"

"#EA3891"

-

dashArray

-

-

-

lineCap

-

-

"round"

-

lineJoin

-

-

"round"

-

opacity

0.9

0.8

1

-

isSandwiched

-

false

-

-

size

4

-

2

-

strokeColor

"#F9F8Fb"

"#777777"

-

-

strokeWidth

1

1

-

-

Examples

Example of a categorical config block
"config": [
	{
    "labelAttribute": ["Wikipedia", "faa"],
		"categoricalAttribute": "faa",
		"categories": ["faa-code-1", "faa-code-2", "faa-code-3"],
		"showOther": true,
		"otherOrder": "above"
	}
]
Example of a vector numeric config block
"config": [
	{
    "labelAttribute": ["Wikipedia", "faa"],
		"numericAttribute": "percentage",
		"steps": [1, 25, 50, 75, 100]
	}
]
Example of a raster numeric config block
"config": {
  "band": 1,
  "method": {"NDVI": {"NIR": 1, "R": 2}},
  "steps": [-0.5, 0.5]
},

PreviousStyle definition blocksNextThe paint block

Last updated 1 year ago

Was this helpful?