Open wasa4587 opened 8 years ago
Hello,
var localDB = new PouchDB("test"); var remoteDB = new PouchDB("http://localhost:5984/test"); PouchDB.plugin(geopouch); localDB.sync(remoteDB,{live: true}) //I comment this line after 1st request //localDB.put({ _id: '_design/foo', spatial: { bar: function (doc) { if(doc.type=='item') emit(doc.geometry); }.toString() } }) localDB.post({geometry: { type: "Point", coordinates: [20.8215207, -102.76524380000001] },type:'item'}).then(function () { console.log('put point'); return localDB.spatial( 'foo/bar', [ 20, -103, 21, -102 ]); }).then(function (resp) { console.log('query 1'); console.log(resp); return localDB.spatial( 'foo/bar', [ 20, -103, 21, -102 ]) }).then(function (resp) { console.log('query 2'); console.log(resp); }).catch(function(err) { console.log('err') console.log(err) });
It works well in a browser let say chrome, but if i try on other browser opera it returns
I'm working with ionic framework, so it also fails on the device.
Hello,
It works well in a browser let say chrome, but if i try on other browser opera it returns
I'm working with ionic framework, so it also fails on the device.