Interface: GeovisWorkspaceSidebarLocatorOption
Defined in: context/GeovisWorkspaceContext.ts:262
One selectable entry in a GeovisWorkspaceSidebarLocatorFilter.
Properties
animation?
optionalanimation?:ViewAnimation
Defined in: context/GeovisWorkspaceContext.ts:314
How the camera travels to view or feature — a flight of a given duration, or an instant cut. A viewPresetId carries its own animation instead, declared on the preset.
feature?
optionalfeature?:object
Defined in: context/GeovisWorkspaceContext.ts:334
The feature this entry stands for: a shape already drawn on the map. The pick frames that shape and marks it as selected.
For a list whose entries are geometry — territories, districts,
catchments — where a center/zoom would be a guess at what the shape
already knows: how close the camera ends up is the size of the thing.
Framing reads the bounds off the source the layer draws, so nothing here
carries coordinates; marking goes through feature-state.selected, which
the layer's selectedPaint is what draws.
featureId defaults to the entry's own id, which is the arrangement to
aim for: one key — an IBGE code, a district code — that searches, frames,
marks and travels in the permalink. Declare it only where the entry's id
and the feature's id genuinely differ.
Takes precedence over view and viewPresetId: an entry that is a shape is framed as one.
featureId?
optionalfeatureId?:string|number
Feature id, when it is not the entry's own id.
layerId
layerId:
string
Id of the layer the shape is drawn on — must match spec.layers[].id.
padding?
optionalpadding?:number
Pixels of breathing room around the framed shape. Defaults to 40.
id
id:
string
Defined in: context/GeovisWorkspaceContext.ts:264
Unique id of the entry.
label
label:
string
Defined in: context/GeovisWorkspaceContext.ts:266
Text matched against the search box and shown in the results.
sublabel?
optionalsublabel?:string
Defined in: context/GeovisWorkspaceContext.ts:268
Secondary line shown under the label in the selected card.
value?
optionalvalue?:string
Defined in: context/GeovisWorkspaceContext.ts:277
Readout shown after the label in the results and, larger, in the selected card — the figure that makes one result worth picking over another, already formatted. Omit it and neither place draws anything.
A string, not a number: what it reads in belongs to the app (a count, a rate, a currency), and so does the locale it is grouped for.
view?
optionalview?:ViewState
Defined in: context/GeovisWorkspaceContext.ts:308
Camera this entry moves to when it is picked, carried on the entry itself.
For a list that comes out of the app's data — a file of municipalities, a
search index — where declaring one ViewPreset per row would put thousands
of entries in the spec, to be revalidated on every rebuild and listed back
in every repair payload, for positions no agent should be enumerating
anyway. The rows are already the app's; their coordinates ride along.
Applied through runtime.setView(): the camera moves without the spec
being rebuilt, exactly as a preset does. It is not dispatched, so unlike
viewPresetId it leaves no entry in the action log — this is user
navigation, not a step an agent took.
Only center, zoom, pitch and bearing are applied; projection is
not, the same limitation setView has everywhere.
viewPresetId?
optionalviewPresetId?:string
Defined in: context/GeovisWorkspaceContext.ts:290
Id of the ViewPreset in spec.viewPresets the camera moves to when this
entry is picked.
For a camera the app curated and named — a handful of framings it also
wants reachable by other means, an agent's set-view-preset among them.
The move is dispatched, so it lands in the action log.
Use view instead for entries that come from the app's own data, and declare one or the other: given both, the preset wins, since a named, spec-declared camera is the more deliberate of the two.