This repository contains the source, demo, sample data, and implementation notes for marching-ants, an npm package for turning GPX history into time-controlled animated layers for Mapbox GL and MapLibre GL.
The project has two main parts:
- A Node.js CLI that ingests GPX files and generates GeoJSON or publishes multi-resolution vector tiles to Mapbox or MapTiler.
- A browser plugin that animates the generated GeoJSON or tiles as marching points or scouts using Mapbox/MapLibre feature state.
data/sample/ sample GPX input
demo/ browser demo
docs/implementation-spec.md implementation-derived agent specification
packages/marching-ants/ publishable npm package and CLI
scripts/ exploratory development scripts
The complete installation, CLI, frontend, and API documentation lives in the package README.
The package requires Node.js 24 or newer.
pnpm installGenerate the demo GeoJSON and manifest:
pnpm run upload-demo:geojsonPublish the sample data to Mapbox or MapTiler:
MAPBOX_ACCESS_TOKEN="..." pnpm run upload-demo:mapbox
MAPTILER_SERVICE_TOKEN="..." pnpm run upload-demo:maptilerThe demo intentionally imports the published package from jsDelivr and the upload scripts intentionally invoke the published CLI through npx. They exercise the package as an external consumer would. Serve the repository with a static development server and open /demo/ to view it.
MIT
