[ows.js] Promises

Juan Manuel Vicente juanma.v82 at gmail.com
Tue Jun 2 08:59:51 PDT 2015


Hi all,

Some days ago I implemented async calls with promises. So the calls change
from this:

*Older version*, sync and blocking method:

// GetRecordsvar results = csw.GetRecords(1,10,filter);console.log(results);

to this:

*New version*, async and no-blocking method:

// GetRecords
csw.GetRecords(1,10,filter).then(function(result){
        console.log(result)
    });

The code can by re-viewed at https://github.com/juanmav/ows.js/tree/promises

any comments?

Regards
JM
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/owsjs/attachments/20150602/b19aaf7a/attachment.html>


More information about the owsjs mailing list