Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

changeset-map

Package Overview
Dependencies
Maintainers
1
Versions
56
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

changeset-map

Visualize OSM changesets on a GL map (WIP)

  • 0.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
22
decreased by-38.89%
Maintainers
1
Weekly downloads
 
Created
Source

OSM Changeset Viewer on a GL Map

Very experimental work in progress. The idea being that you can pass a changeset id and a container HTML element where you want the map rendered, and this plugin should render details of changes made by that changeset in the specified HTML element on a MapboxGL map.

Heavily inspired by the ACHAVI Changeset Viewer: http://wiki.openstreetmap.org/wiki/Achavi

Use as a module

Create a container div to hold the UI.

<div id='container'></div>
var changesetMap = require('changeset-map');
var container = document.getElementById('container');
var changesetMapControl = changesetMap(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-api.de/api/interpreter.

Setup

Install dependencies using npm install.

Test Locally

Run npm run start to start a server and watchify process to watch for changes to your files and re-build. Go to the browser at the port where the webserver is running. eg. http://localhost:8080

Build

To build files, run npm run build.

FAQs

Package last updated on 17 Mar 2017

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