Hi everybody,
I'm glad to see I'm not the only one trying to load GeoJson to the client directly from Webhook service. that would be great!
-------------
exports = function(request, response) {
var data = {
"type": "FeatureCollection",
"features": [ {"type":"Feature",
"geometry":{
"type":"Point",
"coordinates":[1.4257787262069996,38.92189438027659]
}
},
...
]
};
response.addHeader("Content-Type", "application/json");
response.setBody(JSON.stringify(data));
};
-----------
And works perfectly but.....
If I try to get the features array from the mongodb context, I cannot get correctly stringify the EJSON from the query result....
Any ideas????
Thanks in advance
Jose Luis Campos