Skip to content

Instantly share code, notes, and snippets.

@rodja
Created January 25, 2011 15:32
Show Gist options
  • Save rodja/795071 to your computer and use it in GitHub Desktop.
Save rodja/795071 to your computer and use it in GitHub Desktop.
Linccer Javascript Example
var linncer = Linccer({"api_key": "your_api_key", "server": "sandbox" });
window.onload = function() {
if (!Linccer.autoLocate()) {
linccer.setEnvironmentCoordinates(longitude, latitude, accuracy);
}
linccer.on('received', function(data) {
// do somthing with the received data
});
// receive data from a distribution
linccer.receive('ont-to-many');
// distribute data
linccer.send('one-to-many', {arbitrary : 'json data'});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment