Skip to content

Instantly share code, notes, and snippets.

@meddulla
Created April 5, 2011 18:04
Show Gist options
  • Save meddulla/904142 to your computer and use it in GitHub Desktop.
Save meddulla/904142 to your computer and use it in GitHub Desktop.
//responds to request when new click is sent
//to /addDataPoint, otherwise hangs
var displayNewDataPoints = function(req, res) {
MyHeatmap.on('added', function(dt) {
//print client side js so client heatmap
//display functions are called
//and recall this url again
var str = 'xx.addDataPoint('+dt.x+","+dt.y+');';
str += 'ajad_send(nurl);';
res.write(str,'utf8');
res.end();
});
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment