how to call a spatial view using node.js?

Hi there:

I'm trying to get a spatial view, it seems that the couch can not query. The error be delayed after around a minute is the following :

[Error: Unknown REST Error]

any suggestions would be appreciated.

Here's the code I'm using node.js

var db = new couchbase.Connection({
        host: 127.0.0.1, //not real
        bucket: bucketName   //not real
    }, function(err) {
        var query = db.view('bucketName', 'ViewName');
        query.query({
            spatial : true, 
            bbox: [-99.2624, 19.3374, -99.0723, 19.5171],
            stale: false
        }, function(err, results) {
 
            console.log(err);
 
            res.send(esults));
 
        }); 
    });

0 Answers

No answers yet