1 | ;
|
2 | var Promise = require('bluebird');
|
3 | var queryStream = require('./queryStream');
|
4 | module.exports = query;
|
5 | function query(self, bbox) {
|
6 | return new Promise(function (fullfill, reject) {
|
7 | var out = [];
|
8 | queryStream(self, bbox).on('data', function (d){
|
9 | out.push(d);
|
10 | }).on('error', function (e) {
|
11 | reject(e);
|
12 | }).on('end', function () {
|
13 | fullfill(out);
|
14 | });
|
15 | });
|
16 | } |
\ | No newline at end of file |