Skip to main content

Interface: VisualizationSpec

Defined in: spec/types.ts:777

Properties​

__resolved?​

optional __resolved?: boolean

Defined in: spec/types.ts:853

Internal marker set by resolveSpecFromMapType to prevent double-resolution. Consumers should not set this field directly.


adapterHints?​

optional adapterHints?: unknown

Defined in: spec/types.ts:809

Deprecated​

No longer used by the adapter. Kept for backward compatibility so existing specs continue to pass validateSpec(). Will be removed in a future breaking-change release.


attributionControlEnabled?​

optional attributionControlEnabled?: boolean

Defined in: spec/types.ts:839

Controls whether MapLibre's attribution control — the round button in the map's bottom-right corner that expands into the basemap credits — is mounted. Defaults to true.

Set it to false only when the application renders the same credits somewhere else: basemap and source licences (OpenStreetMap's among them) generally require attribution to stay visible, and hiding the control does not lift that obligation. Each source's own attribution string is unaffected — it simply has no built-in surface left to appear on.


basemap?​

optional basemap?: BaseMapSpec

Defined in: spec/types.ts:785


control?​

optional control?: LayerControl

Defined in: spec/types.ts:869

A single floating panel of layer-visibility toggles, overlaid on the map. When present, <GeoVisProvider> auto-mounts a <GeoVisLayerControl> for it — the consumer does not place the component. Each item toggles a set of layers by id via dispatch({ type: 'toggle-layer' }).


description?​

optional description?: string

Defined in: spec/types.ts:781


engine​

engine: "maplibre"

Defined in: spec/types.ts:782


images?​

optional images?: PinImage[]

Defined in: spec/types.ts:802

Images registered on the map, for symbol layers to reference by id (paint.iconImage). They are built and loaded asynchronously; a layer drawing one shows it as soon as it is ready, and again after a basemap change.


layers​

layers: VisualizationLayer[]

Defined in: spec/types.ts:787


legendEnabled?​

optional legendEnabled?: boolean

Defined in: spec/types.ts:826

Controls whether auto-generated legends are produced for the resolved mapType. Defaults to true. Has no effect on legends the user supplies directly via spec.legends.


legends?​

optional legends?: LegendSpec[]

Defined in: spec/types.ts:789

Optional top-level legend registry used by legend UI components.


mapData?​

optional mapData?: MapData[]

Defined in: spec/types.ts:795

Optional attribute datasets joined to geojson sources. Each entry references a source via mapId and provides per-feature values for use in styling, tooltips, charts.


mapModeControl?​

optional mapModeControl?: boolean

Defined in: spec/types.ts:883

Offers the reader a "Modo do mapa" button in the map's top-right corner, which <GeoVisProvider> auto-mounts: "Mapa único" keeps one map, and "Dividir em dois" splits it into two maps side by side, cameras kept together, each showing one item of control the reader picks from the pickers above it — the layer control itself steps aside while split.

Only switches the button on: the mode and the two sides are the reader's choice, never the spec's. Needs a control with at least two items whose layers exist in the spec, which are what the sides choose between; without them the button is not shown. Defaults to false.


mapType?​

optional mapType?: MapType

Defined in: spec/types.ts:783


metadata?​

optional metadata?: Record<string, unknown>

Defined in: spec/types.ts:803


optional navigationControlEnabled?: boolean

Defined in: spec/types.ts:847

Controls whether the engine's navigation control — the zoom in / zoom out buttons and the compass in the map's top-right corner — is mounted. Defaults to true. Read when the map mounts. The split map mode turns it off on its left side, so the two sides share the right side's one column.


proximitySearch?​

optional proximitySearch?: ProximitySearch

Defined in: spec/types.ts:891

A search for the places within a radius of a feature: clicking a feature of one of ProximitySearch.layers drops in around it the places ProximitySearch.query answers — see ProximitySearch. Off while the map is split.


scaleMaxValue?​

optional scaleMaxValue?: number

Defined in: spec/types.ts:819

Visual scale ceiling for proportional symbol rendering.

Values above scaleMaxValue render at the maximum symbol size (e.g. max circle radius). The tooltip always shows the real feature value.

When omitted, the adapter computes it from the dataset.


schemaVersion?​

optional schemaVersion?: number

Defined in: spec/types.ts:779

Schema version this spec was authored against. Omit for the current version — see SPEC_SCHEMA_VERSION.


sources​

sources: DataSource[]

Defined in: spec/types.ts:786


title?​

optional title?: string

Defined in: spec/types.ts:780


view?​

optional view?: ViewState

Defined in: spec/types.ts:784


viewInsets?​

optional viewInsets?: ViewInsets

Defined in: spec/types.ts:903

How many pixels of the map, from each edge, the app covers with its own panels — a sidebar opened over the map, say. What the camera frames by itself, as the proximity search's circle, is fitted to the rest and centred in it. Omitted, or 0, the whole map is free.

Example​

// A 320 px panel open over the map's right side:
viewInsets: { right: 320 }

viewPresets?​

optional viewPresets?: ViewPreset[]

Defined in: spec/types.ts:861

Named, curated camera positions the AI (or a UI control) can jump to by id (dispatch({ type: 'set-view-preset' }), PRD-002) — bounded to positions the application actually declared, instead of raw coordinates an AI would otherwise have to invent.