Skip to content

Repository files navigation

marching-ants workspace

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.

View the live demo

Marching Ants running story in scout mode

The project has two main parts:

  1. A Node.js CLI that ingests GPX files and generates GeoJSON or publishes multi-resolution vector tiles to Mapbox or MapTiler.
  2. A browser plugin that animates the generated GeoJSON or tiles as marching points or scouts using Mapbox/MapLibre feature state.

Repository layout

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.

Local setup

The package requires Node.js 24 or newer.

pnpm install

Generate the demo GeoJSON and manifest:

pnpm run upload-demo:geojson

Publish the sample data to Mapbox or MapTiler:

MAPBOX_ACCESS_TOKEN="..." pnpm run upload-demo:mapbox
MAPTILER_SERVICE_TOKEN="..." pnpm run upload-demo:maptiler

The 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.

Documentation

License

MIT

About

Animate a collection of GPX tracks as time-controlled marching points on Mapbox GL

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages