Search documentation

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

Getting started

Receive active-geo, supply geometry and data, and draw a first map.

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

  1. Receive the package#

    active-geo is a product; its owners active-format, active-helpers and active-virtual come along. Ask the maintainer of Foundation for a bundle of your whole managed set, then follow Receiving packages:

    Terminal
    node tools/rps/rps-apply.mjs plan --bundle <bundle-folder> --developmentnode tools/rps/rps-apply.mjs apply --bundle <bundle-folder> --expect-plan <digest> --development
  2. Declare, install and verify#

    JSON
    {  "dependencies": {    "@workspace/active-geo": "workspace:*",    "react": "^19.0.0",    "react-dom": "^19.0.0"  }}
    Terminal
    pnpm installnode tools/rps/rps-apply.mjs verify-install --from <app-folder>

    The entry imports its own stylesheet; in Next.js list the package and its owners in transpilePackages.

  3. A first map#

    TSX
    'use client';
    import {englishGeoTranslator, GeoMap} from '@workspace/active-geo';
    <GeoMap  title="Regions"  projection="conic-equal-area"  locale="en-GB"  t={englishGeoTranslator}  layers={[    {      type: 'area',      id: 'regions',      title: 'Regions',      features: regions, // [{key, name, geometry: Polygon | MultiPolygon}]      measures: [{id: 'index', label: 'Index'}],      data: [{key: 'north', values: {index: 72}}],      fill: {        measure: 'index',        scale: {type: 'threshold', thresholds: [40, 60, 80]},      },    },  ]}/>;

    The map takes its width from its container; give it a container with a width.

    Sites sized by their staffClient

    Loading the map…

This page as Markdown