function listenForFakeTweets(cb) {
	// Receive fake tweets every 2.5s
	var interval = 2500;
	var tick = 0;
	var picInterval = 5;
	var picUrl = 'http://pbs.twimg.com/media/B6rYzqUCUAAGm_q.jpg';

	var Lowerleftlat   = 45.248314;
	var Lowerleftlong  = -75.990692;
	var Upperrightlat  = 45.569604;
	var Upperrightlong = -75.470890;

	var longDiff = Lowerleftlong - Upperrightlong;
	var latDiff = Upperrightlat - Lowerleftlat;

	setInterval(function() {
		var tweet = {
			author: 'alexanderurq',
			text: 'This is tweet # ' + tick,
			hashtags: ['yolo', 'swag', 'tick' + tick],
			latitude: (Math.random() * latDiff) + Lowerleftlat,
			longitude: (Math.random() * longDiff) + Upperrightlong,
		}

		if (tick % picInterval == 0) {
			tweet.pictures = [picUrl];
		}

		cb(tweet);

		tick++;
	}, interval)
}
// Emulates receiving tweets so I don't have to wait for the real feed
Emulates receiving tweets so I don't have to wait for the real feed
Emulates receiving tweets so I don ' t have to wait for the real feed
function listenForFakeTweets(cb) {
	var interval = 2500;
	var tick = 0;
	var picInterval = 5;
	var picUrl = 'http://pbs.twimg.com/media/B6rYzqUCUAAGm_q.jpg';
	var Lowerleftlat   = 45.248314;
	var Lowerleftlong  = -75.990692;
	var Upperrightlat  = 45.569604;
	var Upperrightlong = -75.470890;
	var longDiff = Lowerleftlong - Upperrightlong;
	var latDiff = Upperrightlat - Lowerleftlat;
	setInterval(function() {
		var tweet = {
			author: 'alexanderurq',
			text: 'This is tweet # ' + tick,
			hashtags: ['yolo', 'swag', 'tick' + tick],
			latitude: (Math.random() * latDiff) + Lowerleftlat,
			longitude: (Math.random() * longDiff) + Upperrightlong,
		}
		if (tick % picInterval == 0) {
			tweet.pictures = [picUrl];
		}
		cb(tweet);
		tick++;
	}, interval)
}
function listenForFakeTweets ( cb ) { var interval = 2500 ; var tick = 0 ; var picInterval = 5 ; var picUrl = 'http://pbs.twimg.com/media/B6rYzqUCUAAGm_q.jpg' ; var Lowerleftlat = 45.248314 ; var Lowerleftlong = - 75.990692 ; var Upperrightlat = 45.569604 ; var Upperrightlong = - 75.470890 ; var longDiff = Lowerleftlong - Upperrightlong ; var latDiff = Upperrightlat - Lowerleftlat ; setInterval ( function ( ) { var tweet = { author : 'alexanderurq' , text : 'This is tweet # ' + tick , hashtags : [ 'yolo' , 'swag' , 'tick' + tick ] , latitude : ( Math . random ( ) * latDiff ) + Lowerleftlat , longitude : ( Math . random ( ) * longDiff ) + Upperrightlong , } if ( tick % picInterval == 0 ) { tweet . pictures = [ picUrl ] ; } cb ( tweet ) ; tick ++ ; } , interval ) }
Emulates receiving tweets so I don't have to wait for the real feed
Emulates receiving tweets so I don ' t have to wait for the real feed
// Receive fake tweets every 2.5s