The paint block
The paint block defines how feature geometries and raster pixels are rendered.
Properties common to all visualization types.
Type | Default | Description | |
---|---|---|---|
| boolean | true | Optional. A flag to tell if features should be clickable |
| boolean | false | Optional. A flag to tell if features should be hoverable |
| boolean | true | Optional. A flag to tell if features affected by this visualization need to be rendered below the basemap road and water layers. Only applies to polygon features, point and line features are already rendered on top of the basemap |
| number | 22 | Optional. The maximum zoom level at which the visualization will be shown |
| number | 0 | Optional. The minimum zoom level at which the visualization will be shown |
| boolean | false | Optional. Decides if a polygon dataset should be render as lines thus making them render above the basemap. Note that using this requires that the style uses line properties instead of polygon ones. |
Simple visualizations
The following properties are available for the simple
type of visualization
Type | Applies to | Description | |
---|---|---|---|
| string | Interpolator | Points, lines and polygons | Optional. The color to be used |
| number[] | Lines | Optional. The dash line definition |
| string | Points, lines and polygons | Optional. The color to be used when a feature is selected |
| string | Points, lines and polygons | Optional. The stroke color to be used when a feature is selected |
|
| Lines | Optional. The shape used to draw the end points of lines |
|
| Lines | Optional. The shape used to join two line segments when they meet |
| number | Interpolator | Points, lines and polygons | Optional. The opacity to use from 0 to 1 |
| number | Interpolator | Points and lines | Optional. Point radius or line width in pixels |
| string | Interpolator | | Points and polygons | Optional. Stroke color |
| number | Interpolator | Points and polygons | Optional. Stroke width in pixels |
See default values for the default values of these attributes on each geometry type.
Categorical and numeric visualizations
The following properties are available for the categorical
and numerical
type visualizations. (You can see an example of a categorical
visualization here)
Type | Applies to | Description | |
---|---|---|---|
| string | Interpolator | Points, lines and polygons | Optional. The color to be used |
| number[] | Lines | Optional. The dash line definition |
|
| Lines | Optional. The shape used to draw the end points of lines |
|
| Lines | Optional. The shape used to join two line segments when they meet |
| number | Interpolator | Points, lines and polygons | Optional. The opacity to use from 0 to 1 |
| number | Interpolator | Points and lines | Optional. Point radius or line width in pixels |
| string | Interpolator | | Points and polygons | Optional. Stroke color |
| number | Interpolator | Points and polygons | Optional. Stroke width in pixels |
Label block reference
These are the properties available to define label rendering. Anchors can be lines or points, polygons are not supported.
Type | Applies to | Description | |
---|---|---|---|
| string | auto | Interpolator | Points and lines | Optional. The label color |
| string | Points and lines | Optional. The font family to use |
| number | Interpolator | Points and lines | Optional. The font size in pixels |
| normal | italic | oblique | Points and lines | Optional. The font style |
| number | Points and lines | Optional. The font weight |
| string | Interpolator | Points and lines | Optional. The label halo color |
| string | Interpolator | Points and lines | Optional. The label halo color width |
| number | Points and lines | Optional. Horizontal spacing behaviour between text characters |
| number | Points and lines | Optional. Sets the height of a line box |
| number | Interpolator | Points and lines | Optional. Defines the max number of characters before a line break |
| number | Points and lines | Optional. The maximum zoom level at which the label will be shown |
| number | Points and lines | Optional. The minimum zoom level at which the label will be shown |
| [number, number] | number | Points and lines | Optional. In the case of points, this value must be an array of two numeric offsets that will be applied on the positive X and Y axis defined by the label placement (i.e. an offset of [3,4] with a label placement of NE moves the label 3pixels to the right and 4 pixels above of the anchor point. An offset of [3,4] with a label placement of SW moves the label 3pixels to the left and 4 pixels below of the anchor point). In case of lines, this value is a single number that moves the label following the label position (i.e. an offset of 3 with a label position of Above will move the label 3 pixels above the line following the line normal. An offset of 3 with a label position of Below will mode the label 3 pixels under the line following the line normal) |
| number | Points and lines | Optional. Adds invisible padding around the label that's used to compute label collisions |
| TextPlacements[] | auto | LineLabelPlacement | Points and Lines | Optional. If defined on a points dataset, an array of label placements to test when placing the label. If all the placements collide with already existing labels, the label is not shown. If defined on a lines dataset, the label placement on a line |
| boolean | Polygons | Optional. Renders labels along lines instead of using the centroids |
| number | Lines | Optional. The distance in pixels between label repetitions on a line |
| capitalize | uppercase | lowercase | Points and lines | Optional. Specifies how to capitalize the label |
| boolean | Points, Lines and Polygons | Optional. A flag to tell if labels should be clickable |
| boolean | Points, Lines and Polygons | Optional. A flag to tell if labels should be hoverable |
See default values of these attributes on each label type.
If using a categorical
or numeric
visualization, all the previous properties must be arrays. If there's a single value in the array, that value is used in all categories. If there are as many values as categories
, the corresponding value will be used for each category. You can see an example of a categorical
viz here.
Default values
Name | Points | Polygons | Lines |
---|---|---|---|
| "#EE4D5A" | "#826DBA" | "#4CC8A3" |
| "#EA3891" | "#EA3891" | "#EA3891" |
| "#EA3891" | "#EA3891" | "#EA3891" |
| - | - | |
| - | - | "round" |
| - | - | "round" |
| 0.9 | 0.8 | 1 |
| - | false | - |
| 4 | - | 2 |
| "#F9F8Fb" | "#777777" | - |
| 1 | 1 | - |
Last updated