Skip to content

Instantly share code, notes, and snippets.

View oalami's full-sized avatar

Ossama Alami oalami

  • San Francisco, CA
View GitHub Profile
/*global Firebase, google, $, GeoFire */
(function () {
"use strict";
var map, previousInfowindow, ref, center, radiusInKm,
markers = {},
lines = {};
radiusInKm = 0.5;
ref = new Firebase("https://publicdata-parking.firebaseio.com/san_francisco");
center = [37.78565219391501, -122.4058404513338];
@oalami
oalami / earthquakes.js
Last active March 12, 2021 13:27
Global Earthquakes in Realtime using Firebase Open Data Sets
const CONTINENTS = ["europe", "asia", "africa", "north_america", "south_america", "antartica", "oceanic"];
var map;
var previousInfowindow;
var ref = new Firebase("https://publicdata-earthquakes.firebaseio.com/by_continent/");
function mapQuake(snapshot) {
var quake = snapshot.val();
var myLatlng = new google.maps.LatLng(quake.location.lat,quake.location.lng);
map.setCenter(myLatlng);