← Writings

Map Builder Controls Spec

Generic chart styling breaks down on maps. This spec defines layer-aware controls for projections, choropleths, point symbols, flows, labels, legends, interactions, and geometry joins.

1. Design Rules

Layer-specific panels

Only show controls that apply to the active layer type. Region borders are not point marker outlines, and flow width is not polygon stroke.

Map-native semantics

Use projection, join key, graticule, bundling, and clustering instead of generic controls like border radius that have no geographic meaning.

Conditional visibility

A builder should expose different controls for polygons, points, flows, labels, legends, and data joins.

No fake controls

Do not render unsupported controls. For example, border radius should stay hidden unless a layer uses rectangular symbols.

2. Layer Visibility

Base Map

1 section visible

Base Map

Region Layer

1 section visible

Region Layer

Point Layer

1 section visible

Point Layer

Flow Layer

1 section visible

Flow Layer

Labels

1 section visible

Labels

Legend

1 section visible

Legend

Interaction

1 section visible

Interaction

Data Binding

1 section visible

Data Binding

3. Control Inventory

Base Map

Projection, frame, and geographic reference settings.

Projection
select

Choose how lat/lon coordinates are projected onto the canvas.

Center Latitude
number · -90–90deg

Move the map viewport vertically.

Center Longitude
number · -180–180deg

Move the map viewport horizontally.

Zoom
range · 0.5–12x

Scale the projected map without changing the container size.

Rotation
range · -180–180deg

Rotate the map to emphasize a geography or flow direction.

Fit To Data
toggle

Auto-frame the geometry bounds around visible data.

Show Graticule
toggle

Display latitude and longitude reference lines.

Show Coastlines
toggle

Draw coastline outlines for geographic context.

Show Country Borders
toggle

Show country boundaries on top of the base layer.

Region Layer

Polygon fill, borders, and choropleth behavior.

Fill Color
color

Base fill for regions when no quantitative color encoding is used.

Color Scale Type
select

Choose the region color encoding mode.

Domain Min
number

Lower bound for region value encoding.

Domain Max
number

Upper bound for region value encoding.

Missing Data Color
color

Fallback fill for unmatched or null regions.

Border Color
color

Outline color for region boundaries.

Border Width
range · 0–8px

Outline thickness for polygons.

Border Opacity
range · 0–1

Transparency of region outlines.

Hover Style
select

Interaction state used while hovering a region.

Point Layer

Markers, clustering, and point collision behavior.

Marker Shape
select

Choose the point mark geometry.

Marker Size
range · 2–48px

Base symbol size for point layers.

Size Scale Min
number · 0–48px

Smallest symbol size when a field drives marker size.

Size Scale Max
number · 1–96px

Largest symbol size when a field drives marker size.

Fill Color
color

Fill color for markers.

Stroke Color
color

Outline color for markers.

Stroke Width
range · 0–10px

Outline thickness for markers.

Cluster Points
toggle

Group dense point layers into aggregate markers.

Collision Handling
select

Resolve overlapping points and labels.

Flow Layer

Directional lines, routes, and movement encoding.

Line Color
color

Base color for route or flow lines.

Line Width
range · 0.5–16px

Base thickness for line layers.

Opacity
range · 0–1

Transparency of flow lines.

Curve Strength
range · 0–1

Amount of curvature applied to routes.

Dash Pattern
select

Stroke pattern for emphasizing state or uncertainty.

Arrowheads
toggle

Show directionality at the end of each flow.

Bundling
range · 0–1

Bundle similar routes to reduce clutter.

Labels

Text source, placement, and readability.

Show Labels
toggle

Display labels for map features.

Label Field
text

Data field used for label content.

Font Size
range · 8–32px

Label text size.

Text Color
color

Label fill color.

Halo Color
color

Outline behind text for contrast.

Halo Width
range · 0–8px

Thickness of the label halo.

Priority
select

Rule used when not all labels fit.

Abbreviate Labels
toggle

Shorten long names to fit dense layouts.

Legend

Legend visibility, format, and placement.

Show Legend
toggle

Display a map legend.

Legend Type
select

Choose the legend visual treatment.

Legend Title
text

Visible title for the legend.

Legend Position
select

Anchor the legend within the map frame.

Number Format
select

Format used for legend values.

Interaction

Selection, tooltips, and viewport behavior.

Hover Tooltip
toggle

Show tooltip content on hover.

Tooltip Fields
multiselect

Fields included in the tooltip payload.

Click To Select
toggle

Enable selection on click.

Multi Select
toggle

Allow multiple selected map entities.

Pan / Zoom Enabled
toggle

Allow users to navigate the viewport directly.

Drilldown Action
select

Configure what happens when a feature is selected.

Data Binding

Geometry sources and data join rules.

Geometry Source
text

GeoJSON or TopoJSON source identifier.

Join Key
text

Field used to match tabular data to map features.

Value Field
text

Field used for encoding or aggregation.

Unmatched Regions
select

Fallback behavior when a region does not join.

Aggregation Method
select

Method used when multiple records map to one feature.