# changeset-map

> Provide visualization of changesets to OSMCha & to the OSM community

Latest version **1.14.0** (published 2024-09-12) · ISC license · 0 weekly downloads

## Install

```sh
npm install changeset-map
pnpm add changeset-map
yarn add changeset-map
bun add changeset-map
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; large bundle.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 1.14.0 |
| Published | 2024-09-12 |
| First published | 2017-03-17 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 9 |
| Unpacked size | 10.1 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 35 |
| Author | Mapbox |
| Maintainers | geohacker, mapbox-admin, kepta, rasagy, willemarcel, jake-low |

## Links

- npm: https://www.npmjs.com/package/changeset-map
- Repository: https://github.com/osmlab/changeset-map
- Homepage: https://github.com/osmlab/changeset-map#readme
- Issues: https://github.com/osmlab/changeset-map/issues
- npm.io page: https://npm.io/package/changeset-map

## Dependencies (9)

- [date-fns](https://npm.io/package/date-fns.md) ^2.22.1
- [mapbox-gl](https://npm.io/package/mapbox-gl.md) ^1.13.1
- [@turf/bbox](https://npm.io/package/@turf/bbox.md) ^6.4.0
- [@turf/helpers](https://npm.io/package/@turf/helpers.md) ^6.4.0
- [platform-detect](https://npm.io/package/platform-detect.md) ^3.0.1
- [@turf/bbox-polygon](https://npm.io/package/@turf/bbox-polygon.md) ^6.4.0
- [react-click-outside](https://npm.io/package/react-click-outside.md) ^3.0.1
- [real-changesets-parser](https://npm.io/package/real-changesets-parser.md) ^1.3.0
- [@osmcha/osm-adiff-parser](https://npm.io/package/@osmcha/osm-adiff-parser.md) ^2.0.0

## Recent versions

- 1.14.0 (latest) — 2024-09-12
- 1.0.8 (beta) — 2017-06-15
- 1.13.0 — 2024-08-26
- 1.12.1 — 2024-04-18
- 1.12.0 — 2023-09-06
- 1.11.3 — 2022-12-09
- 1.11.2 — 2022-02-15
- 1.11.1 — 2022-02-14
- 1.11.0 — 2021-10-24
- 1.10.0 — 2021-06-30
- 1.9.4 — 2021-03-31
- 1.9.3 — 2021-02-03
- 1.9.2 — 2021-01-27
- 1.9.1 — 2021-01-20
- 1.9.0 — 2021-01-07
- … 41 more at https://npm.io/package/changeset-map/versions

## README

### OSM Changeset Viewer on a GL Map

[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-v2.0%20adopted-ff69b4.svg)](code_of_conduct.md)

![](https://cloud.githubusercontent.com/assets/126868/24163445/a88728d4-0e90-11e7-9d02-d755b7845c00.png)

Changeset viewer module for [osmcha.org](https://osmcha.org/) ([Example](https://osmlab.github.io/changeset-map/#110574164), [Github](https://github.com/mapbox/osmcha-frontend)).

Pass a changeset id to render details of changes made by that changeset on a MapboxGL map.

Heavily inspired by the ACHAVI Changeset Viewer ([Example](https://overpass-api.de/achavi/?changeset=110574164), [Github](https://github.com/nrenner/achavi)).

### Use as a module

Create a container div to hold the UI.

```html
<div id='container'></div>
```

```js
// es6 modules
import {getChangeset, query, propsDiff, render} from 'changeset-map';

// commonjs
var changesetMap = require('changeset-map');
var render = changesetMap.render;

var container = document.getElementById('container');
var changesetMapControl = render(container, changesetID, { width: '1000px', height: '1000px' });

// binding events
changesetMapControl.on('load', function () {
    changesetMapControl.emit('selectFeature', 'node|way', featureId);
    changesetMapControl.emit('clearFeature');
    changesetMapControl.on('hashchange', function(geometryType, featureId) {
        // update hash.
    });
})
```

For a custom overpass instance, set a `overpassBase` key in the options object. Default instance is https://overpass.osmcha.org/api/interpreter.

### Build

 - Build the plugin by `npm run build`.
 - Build the website by `npm run build:website`, the websites html can be found in `public` folder. The javascript code to run changeset map can be found in `www` folder.

### Development

 - Install [asdf version manager](https://asdf-vm.com/guide/getting-started.html#getting-started)
 - `asdf install` # To install the required tools from [.tool-versions](./.tool-versions)
 - `yarn add react react-dom` # Install those packages manually
 - `yarn install` # Install packages
 - `yarn start` # To get going …

---
_Source: https://npm.io/package/changeset-map · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
