|
2 | 2 |
|
3 | 3 | Reference for the GeoSet Map Layer JSON configuration object. This is the schema that controls how geographic features are styled, colored, and labeled. |
4 | 4 |
|
5 | | -- [Overview of Schema Fields](#overview-of-schema-fields) |
6 | | - - [Constraints](#constraints) |
7 | | -- [Field Specifications](#field-specifications) |
8 | | - - [globalColoring](#globalcoloring) |
9 | | - - [colorByCategory](#colorbycategory) |
10 | | - - [colorByValue](#colorbyvalue) |
11 | | - - [pointSize](#pointsize) |
12 | | - - [textOverlayStyle](#textoverlaystyle) |
13 | | - - [legend](#legend) |
| 5 | +- [JSON Config Spec](#json-config-spec) |
| 6 | + - [Complete Example](#complete-example) |
| 7 | + - [Overview of Schema Fields](#overview-of-schema-fields) |
| 8 | + - [Constraints](#constraints) |
| 9 | + - [Field Specifications](#field-specifications) |
| 10 | + - [globalColoring](#globalcoloring) |
| 11 | + - [colorByCategory](#colorbycategory) |
| 12 | + - [colorByValue](#colorbyvalue) |
| 13 | + - [Constraints](#constraints-1) |
| 14 | + - [pointSize](#pointsize) |
| 15 | + - [Static](#static) |
| 16 | + - [Dynamic (data-driven)](#dynamic-data-driven) |
| 17 | + - [Constraints](#constraints-2) |
| 18 | + - [textOverlayStyle](#textoverlaystyle) |
| 19 | + - [legend](#legend) |
| 20 | + |
| 21 | +## Complete Example |
| 22 | + |
| 23 | +A full configuration showing all fields together. This example renders wind station points colored by `max_wind_speed` on a yellow-to-red gradient (using percentile bounds), with data-driven point sizing on the same column: |
| 24 | + |
| 25 | +```json |
| 26 | +{ |
| 27 | + "globalColoring": { |
| 28 | + "fillColor": [40, 147, 179, 255], |
| 29 | + "strokeColor": [0, 0, 0, 255], |
| 30 | + "strokeWidth": 2, |
| 31 | + "lineStyle": "solid", |
| 32 | + "fillPattern": "solid", |
| 33 | + "pointType": "circle" |
| 34 | + }, |
| 35 | + "colorByValue": { |
| 36 | + "valueColumn": "max_wind_speed", |
| 37 | + "startColor": [255, 255, 0, 255], |
| 38 | + "endColor": [255, 0, 0, 255], |
| 39 | + "lowerBound": "10%", |
| 40 | + "upperBound": "90%", |
| 41 | + "breakpoints": ["25%", "50%", "75%"] |
| 42 | + }, |
| 43 | + "pointSize": { |
| 44 | + "valueColumn": "max_wind_speed", |
| 45 | + "startSize": 4, |
| 46 | + "endSize": 30, |
| 47 | + "lowerBound": null, |
| 48 | + "upperBound": null |
| 49 | + }, |
| 50 | + "legend": { |
| 51 | + "title": "Wind Stations", |
| 52 | + "name": null |
| 53 | + } |
| 54 | +} |
| 55 | +``` |
| 56 | + |
| 57 | +> **Note:** `colorByCategory` and `colorByValue` are mutually exclusive — use one or the other, not both. When either is present, `legend.name` must be `null`. |
14 | 58 |
|
15 | 59 | ## Overview of Schema Fields |
16 | 60 |
|
@@ -122,14 +166,14 @@ Given a hurricane dataset with a `max_wind_speed` column (in mph), this config c |
122 | 166 | } |
123 | 167 | ``` |
124 | 168 |
|
125 | | -| Field | Type | Required | Description | |
126 | | -| ------------- | ----------------------------------------------- | -------- | ----------------------------------------------------------- | |
127 | | -| `valueColumn` | string | **yes** | Numeric column to map to color. | |
128 | | -| `startColor` | `[R, G, B, A]` | **yes** | Color at the low end of the gradient. | |
129 | | -| `endColor` | `[R, G, B, A]` | **yes** | Color at the high end of the gradient. | |
130 | | -| `lowerBound` | number, percentage string, or `null` | no | Value mapped to `startColor`. `null` uses the data minimum. | |
131 | | -| `upperBound` | number, percentage string, or `null` | no | Value mapped to `endColor`. `null` uses the data maximum. | |
132 | | -| `breakpoints` | array of numbers or percentage strings | **yes** | Intermediate stops for the gradient. Can be empty (`[]`). | |
| 169 | +| Field | Type | Required | Description | |
| 170 | +| ------------- | -------------------------------------- | -------- | ----------------------------------------------------------- | |
| 171 | +| `valueColumn` | string | **yes** | Numeric column to map to color. | |
| 172 | +| `startColor` | `[R, G, B, A]` | **yes** | Color at the low end of the gradient. | |
| 173 | +| `endColor` | `[R, G, B, A]` | **yes** | Color at the high end of the gradient. | |
| 174 | +| `lowerBound` | number, percentage string, or `null` | no | Value mapped to `startColor`. `null` uses the data minimum. | |
| 175 | +| `upperBound` | number, percentage string, or `null` | no | Value mapped to `endColor`. `null` uses the data maximum. | |
| 176 | +| `breakpoints` | array of numbers or percentage strings | **yes** | Intermediate stops for the gradient. Can be empty (`[]`). | |
133 | 177 |
|
134 | 178 | **Percentage bounds:** You can use strings like `"10%"` or `"90%"` for bounds and breakpoints. These are resolved against the actual data distribution on the frontend (e.g. `"10%"` means the 10th percentile of the data). This is useful when the data is skewed or contains outliers. |
135 | 179 |
|
|
0 commit comments