Skip to main content

Interface: MapData

Defined in: spec/types.ts:554

Attribute dataset attached to a geojson source. Decouples geometry (in sources[]) from values, so the same geometry can be reused with multiple datasets, and values can be mutated independently from features.

Properties​

data​

data: MapDataRow[]

Defined in: spec/types.ts:577


description?​

optional description?: string

Defined in: spec/types.ts:559


dimension?​

optional dimension?: "color" | "size"

Defined in: spec/types.ts:576

Visual dimension this dataset drives. When set, the adapter auto-discovers which dataset provides color vs. size for each layer, eliminating the need for layer-level mapDataColor/mapDataSize references. Two datasets on the same source must use different dimension values.


joinKey?​

optional joinKey?: string

Defined in: spec/types.ts:564

Property name on each feature used to match data[].geometryId. Defaults to using feature.id when omitted.


mapDataId​

mapDataId: string

Defined in: spec/types.ts:555


mapId​

mapId: string

Defined in: spec/types.ts:557

FK to sources[].id of a geojson source.


stateKey?​

optional stateKey?: string

Defined in: spec/types.ts:569

Feature-state key name used when applying this dataset via setFeatureState. Defaults to 'value' for backward compatibility.


title?​

optional title?: string

Defined in: spec/types.ts:558