changeset-map
Visualize OSM changesets on a GL map (WIP)
Last updated 3 years ago by ajithranka .
ISC · Original npm · Tarball · package.json
$ cnpm install changeset-map 
SYNC missed versions from official npm registry.

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>
// 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.maptime.in/api/interpreter.

Setup

  • Install dependencies using npm install.

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

  • nvm use 8.15.1 # Use node 8.15, nvm is recommended
  • yarn add react react-dom # Install those packages manually
  • yarn install # Install packages
  • yarn start # To get going …

Current Tags

  • 1.0.8                                ...           beta (3 years ago)
  • 1.4.5                                ...           latest (2 months ago)

35 Versions

  • 1.4.5                                ...           2 months ago
  • 1.4.4                                ...           3 months ago
  • 1.4.3                                ...           4 months ago
  • 1.4.2                                ...           4 months ago
  • 1.4.1                                ...           6 months ago
  • 1.4.0                                ...           6 months ago
  • 1.3.10                                ...           7 months ago
  • 1.3.9                                ...           8 months ago
  • 1.3.8                                ...           8 months ago
  • 1.3.7                                ...           8 months ago
  • 1.3.6                                ...           a year ago
  • 1.3.5                                ...           a year ago
  • 1.3.4                                ...           a year ago
  • 1.3.2                                ...           2 years ago
  • 1.3.1                                ...           2 years ago
  • 1.3.0                                ...           3 years ago
  • 1.2.0                                ...           3 years ago
  • 1.1.0                                ...           3 years ago
  • 1.0.8                                ...           3 years ago
  • 1.0.7                                ...           3 years ago
  • 1.0.6                                ...           3 years ago
  • 1.0.5                                ...           3 years ago
  • 1.0.4                                ...           3 years ago
  • 1.0.3                                ...           3 years ago
  • 1.0.2                                ...           3 years ago
  • 1.0.1                                ...           3 years ago
  • 1.0.0                                ...           3 years ago
  • 0.0.88888888                                ...           3 years ago
  • 0.0.7                                ...           3 years ago
  • 0.0.6                                ...           3 years ago
  • 0.0.5                                ...           3 years ago
  • 0.0.4                                ...           3 years ago
  • 0.0.3                                ...           3 years ago
  • 0.0.2                                ...           3 years ago
  • 0.0.1                                ...           3 years ago
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 1
Last Month 3
Dependencies (8)
Dev Dependencies (4)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |