Created
January 25, 2011 15:32
-
-
Save rodja/795071 to your computer and use it in GitHub Desktop.
Linccer Javascript Example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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