package
stream minutely openstreetmap diffs
npm install osm-streamGitHub-flavored package documentation.
Across all versions.
Download trend unavailable.
Runtime metadata.
Tagged topics.
Uses the Overpass API for Augmented Diffs, loads data with CORS and exposes a stream.
Without browserify: copy osmstream.js. That works as an osmStream global
and with UMD.
With browserify npm install osm-stream
s.once(function(err, data) { }, [bbox])
Get one batch of changes right now.
s.run(function(err, stream), duration, [dir], [bbox])
duration is how long between runs: default 1 minute
dir is direction: either 1, the default, or -1 for rewind.
s.runFn(function(err, stream), duration, [dir], [bbox])
Same as .run but instead of returning a stream that pipes objects, calls
the callback once per object.
duration is how long between runs: default 1 minute
dir is direction: either 1, the default, or -1 for rewind.
var osmStream = require('osm-stream');
// re-request every 60s
osmStream
.run(function(err, stream) {
stream.on('data', function(d) {
console.log(d);
});
});
// re-request every 60s
// callback-style interface
osmStream
.runFn(function(err, data) {
// ...
});
// one-time request
osmStream
.once(function(err, d) {
console.log(d);
});The stream returned uses through, so you can end it and that will also stop the run cycle.
sbma44
tlee@mapbox.com
mcwhittemore
mcwhittemore@gmail.com
isiyu
siyu.song@gmail.com
freenerd
spam@freenerd.de
apendleton
andrew@mapbox.com
alulsh
ulsh@mapbox.com
amyleew
amyleewalton@gmail.com
iandees
ian.dees@gmail.com
mapbox-admin
accounts@mapbox.com
sgillies
sean@mapbox.com
lbud
lauren@mapbox.com
bsudekum
bobby@mapbox.com
dnomadb
damon@mapbox.com
ian29
ian.villeda@gmail.com
nickidlugash
nicki@mapbox.com
samanbb
saman@mapbox.com
ajashton
aj@mapbox.com
lxbarth
alex@mapbox.com
ianshward
ian@mapbox.com
mourner
agafonkin@gmail.com
tristen
tristen.brown@gmail.com
ingalls
nicholas.ingalls@gmail.com
ansis
ansis.brammanis@gmail.com
jfirebaugh
john.firebaugh@gmail.com
miccolis
jeff@miccolis.net
gretacb
carol@mapbox.com
morganherlocker
morgan.herlocker@gmail.com
rclark
ryan.clark.j@gmail.com
willwhite
will@mapbox.com
springmeyer
dane@mapbox.com
kkaefer
mail@kkaefer.com
yhahn
young@mapbox.com