Skip to content

Instantly share code, notes, and snippets.

Franck Ernewein FranckErnewein

Block or report user

Report or block FranckErnewein

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@FranckErnewein
FranckErnewein / lightstream-liveonly-doc.md
Last active Nov 13, 2015
Lighstream liveonly documentation, for highspeed traffic
View lightstream-liveonly-doc.md

Lightstream API

Lightstream is a solution which allows you to map any kind of geocalized data in real time. Lightstream API is the backend entry you want to use to push your items, so you can visualize them on the front end. This documentation will help you understand how easy it is to use .

Index

  • Items and types explains why items and types are important in Lightstream
  • API access gives you all information to access the API.
View marker_cluster.js
var L = window.L;
var addressPoints = window.addressPoints;
var tiles = L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
maxZoom: 18,
attribution: '&copy; <a href="http://osm.org/copyright">OpenStreetMap</a> contributors, Points &copy 2012 LINZ'
}),
latlng = L.latLng(-37.82, 175.24);
var map = L.map('map', {
center: latlng,
@FranckErnewein
FranckErnewein / send.php
Created Sep 3, 2015
send data to lightstream API in PHP
View send.php
<?php
$server = 'test.lightstream.io';
$type = 'ads';
$key = 'b72d053a3722415fab181af70e89a8f2';
$query_string = '?api_key='.$key;
$url = 'http://'.$server.'/api/items/'.$type;
$generated_id = 'test_' . time();
View Lightstream-doc.md

Lightstream API

Lightstream is a solution which allows you to map any kind of geocalized data in real time. Lightstream API is the backend entry you want to use to push your items, so you can visualize them on the front end. This documentation will help you understand how easy it is to use .

Index

  • Items and types explains why items and types are important in Lightstream
  • API access gives you all information to access the API.
View Router.js
var backbone = require('Backbone');
var $ = require('jquery');
// Views Classes
var ListNewsView = require('///');
var NewsView = require('///');
var Home = require('///');
// define router
var MyRouter = Backbone.Router.extend({
View backbone-ajax-node.js
var Backbone = require('backbone');
var najax = require('najax');
//set ajax fonction in node
Backbone.ajax = najax;
//create a collection
var Users = Backbone.Collection.extend({
url: 'https://raw.github.com/FranckErnewein/perso/master/www/data/work.json',
});
@FranckErnewein
FranckErnewein / Deferred.js
Created Nov 27, 2013
jQuery Promise style based on Backbone.Events
View Deferred.js
define([
'underscore',
'backbone'
], function( _, Backbone ){
function Deferred(){
this.resolved = false;
this.rejected = false;
}
You can’t perform that action at this time.