OSM Overpass
A library to query OSM Overpass servers
Example
Async example
let url = Stringfrom;
let query = "
[out:json][timeout:30];
node(3662847634);
// print results
out;
";
let api = new;
let res = api.query.await;
...
Sync example
...
let res = api.query_sync;
Using query response
...
let unwrapped = res.unwrap;
//unwrapped is iterable, so
for nwr in unwrapped
Notes
Queries must return a JSON result. Put [out:json] in the first line of
the query to do this.