Search documentation

Search all pages, headings and text, in the current package or topic or in all documentation.

active-geo

Maps for React - areas, point symbols and context geometry over geometry you supply, with a legend, a table, a menu and export, and an optional world collection.

@workspace/active-geo 0.4.0Developmentunreleased, in development in Foundationbaseline ce081dc3

@workspace/active-geo draws one component, GeoMap: typed layers of areas, point symbols (in SVG or on a canvas) and context geometry, over geometry your application supplies, in a projection you name. The default is a quiet map: the title, the map and its source line; navigation appears on demand, a legend only when something needs explaining, and the family menu (right click, long press, Shift+F10) carries copy, the table, navigation and export.

Countries coloured by a measureClient

Loading the map…

Version 0.x

The package is at version 0.4.0 with the P1 interface, still in development: workable, not yet stable, and not accepted as version 1. Later phases (symbols and shapes, line layers, continuous colour, clusters) are not available and are refused at run time with a clear error.

What it does#

  • Layers: areas (features with a key, a name and a polygon), points (latitude, longitude) and context geometry (outlines, rivers) that is drawn but never interactive.
  • Measures and encodings: values per object, a fill by a classed scale (threshold, quantize, category, diverging), a circle size by area; missing and withheld values have their own states.
  • Around the map: header, legend, tooltip, labels, zoom and pan, selection, the accessible table, the menu, and export to PNG, SVG and CSV.
  • Host composition: outlets for the legend and the table, GeoMapScope, the host's own buttons.

What it does not do#

  • No geography by default. The runtime entry carries no map data; the optional world collection is a separate entry that loads on demand.
  • No tiles, no network. Nothing leaves your host: you pass the geometry.
  • No language of its own. Words go through your translator (t); englishGeoTranslator is the package's English.

What your application provides#

  • The geometry and the data, joined by key; the projection.
  • A presentation (locale) and a translator (t), per map or on <GeoDefaults>.
  • Optionally the --geo-* colour tokens (the package reads your semantic tokens too, so on this site a map matches active-ui without a mapping), your own Button, Toggle and Input.
  • The attribution of your geometry: for the world collection, Natural Earth's suggested credit.

Dependencies#

@workspace/active-format, @workspace/active-helpers and @workspace/active-virtual (owners that come along), d3-geo, d3-scale, @base-ui/react, date-fns and @date-fns/tz. react and react-dom 19 are peers.

Next#

This page as Markdown