1.12.1 • Published 23 days ago

changeset-map v1.12.1

Weekly downloads
8
License
ISC
Repository
github
Last release
23 days ago

OSM Changeset Viewer on a GL Map

Contributor Covenant

npm.io

Changeset viewer module for osmcha.org (Example, Github).

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, Github).

Use as a module

Create a container div to hold the UI.

<div id='container'></div>
// 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
  • asdf install # To install the required tools from .tool-versions
  • yarn add react react-dom # Install those packages manually
  • yarn install # Install packages
  • yarn start # To get going …
1.12.1

23 days ago

1.12.0

8 months ago

1.11.3

1 year ago

1.11.2

2 years ago

1.11.1

2 years ago

1.11.0

3 years ago

1.10.0

3 years ago

1.9.4

3 years ago

1.9.3

3 years ago

1.9.2

3 years ago

1.9.1

3 years ago

1.9.0

3 years ago

1.8.2

3 years ago

1.8.1

3 years ago

1.8.0

3 years ago

1.7.0

3 years ago

1.6.1

4 years ago

1.6.0

4 years ago

1.5.0

4 years ago

1.4.5

4 years ago

1.4.4

4 years ago

1.4.3

4 years ago

1.4.2

4 years ago

1.4.1

4 years ago

1.4.0

4 years ago

1.3.10

4 years ago

1.3.9

4 years ago

1.3.8

5 years ago

1.3.7

5 years ago

1.3.6

5 years ago

1.3.5

5 years ago

1.3.4

5 years ago

1.3.2

6 years ago

1.3.1

6 years ago

1.3.0

6 years ago

1.2.0

6 years ago

1.1.0

7 years ago

1.0.8

7 years ago

1.0.7

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago

0.0.88888888

7 years ago

0.0.7

7 years ago

0.0.6

7 years ago

0.0.5

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago