Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
/roll up the results
query.on('row', function (result) {
if (!result) {
return res.send('No data found');
} else {
if (geom == "features") {
coll.features.push(geojson.getFeatureResult(result, spatialcol)); //use helper function
} else if (geom == "geometry") {
var shape = JSON.parse(result.geojson);
//send the results
query.on('end', function (err, result) {
res.setHeader('Content-Type', 'application/json');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment