# JamesLMilner/terra-draw

A library for drawing on maps that supports Mapbox, MapLibre, Google Maps, OpenLayers and Leaflet out the box

Repository: https://github.com/JamesLMilner/terra-draw
Canonical: https://ross.abutalabs.com/products/terra-draw
Homepage: https://terradraw.io
Language: TypeScript
License: MIT
License Family: permissive
Topics: draw, geojson, google-maps-api, leaflet, map, mapbox-gl, maps, drawing, maplibre, polygon, geodesic, geojson-editor, geometry, maplibre-gl-js
Last push: 2026-08-31T12:15:18+00:00

## Health v2 (maintenance only)
Score: 99/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 100, release rhythm 96, longevity 100
- inputs: {"age_days": 1510, "days_push": 2, "days_rel": 25, "gap_med": 16, "n_releases_24m": 2}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1093, forks 115 (observed 2026-09-01T02:13:55.216425+00:00)

## What it is
Terra Draw is a TypeScript library for drawing shapes and geometries on web maps, with built-in adapters for Leaflet, OpenLayers, MapLibre GL JS, Google Maps, Mapbox GL JS, and ArcGIS JS SDK. It centralizes drawing logic into reusable modes (point, line, polygon, geodesic, etc.) that work consistently across mapping libraries.

## Use cases
- draw polygons on a map to define areas of interest
- let users sketch routes or lines on a Leaflet map
- add drawing tools to a MapLibre GL JS application
- capture GeoJSON geometry input from users on Google Maps
- build a map annotation or measurement feature
- edit existing GeoJSON features on a web map
- draw geodesic lines that account for earth curvature

## When to choose
- you need consistent drawing functionality across multiple mapping libraries
- you want out-of-the-box drawing modes without building from scratch
- your app uses MapLibre, Mapbox, Leaflet, OpenLayers, Google Maps, or ArcGIS JS
- you need GeoJSON output from user-drawn geometries

## When to avoid
- you use a mapping library without a supported adapter
- you need advanced CAD-style editing or 3D drawing
- you only need static map rendering with no user interaction

## Facets
- artifact type: library
- maturity: active
- function: ui-components, graphics, geospatial
- domain: web-development, frontend
- platform: browser
- tags: map-drawing, geo, leaflet, mapbox-gl, maplibre, google-maps, openlayers, arcgis, polygon-drawing, geodesic, maps, geospatial, javascript, typescript

## Member repositories
- JamesLMilner/terra-draw (main) score 99

## Provenance
- Observed fields: from GitHub, fetched 2026-09-01T02:13:55.216425+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T06:49:11.362807+00:00, confidence not recorded.
  - readme: https://github.com/JamesLMilner/terra-draw (fetched 2026-09-01T02:13:55.216425+00:00, sha 8fcf69d00f1a)
  - homepage: https://terradraw.io (fetched 2026-08-29T12:51:22.330440+00:00, sha 97049b2564b5)
- Data as of 2026-08-30T08:39:29.467469+00:00.
