Socket
Socket
Sign inDemoInstall

changeset-map

Package Overview
Dependencies
Maintainers
0
Versions
56
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

changeset-map

Provide visualization of changesets to OSMCha & to the OSM community


Version published
Maintainers
0
Created
Source

OSM Changeset Viewer on a GL Map

Contributor Covenant

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 …

FAQs

Package last updated on 12 Sep 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc