Provide visualization of changesets to OSMCha & to the OSM community


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).
Create a container div to hold the UI.
``html`
`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 the plugin by npm run build.npm run build:website
- Build the website by , the websites html can be found in public folder. The javascript code to run changeset map can be found in www folder.
- Install asdf version manager
- asdf install # To install the required tools from .tool-versionsyarn add react react-dom
- # Install those packages manuallyyarn install
- # Install packagesyarn start` # To get going …
-