Skip to content

Instantly share code, notes, and snippets.

View clintandrewhall's full-sized avatar
⌨️
hacking away

Clint Andrew Hall clintandrewhall

⌨️
hacking away
View GitHub Profile
@gboone
gboone / midpoint
Created November 28, 2015 23:47
How to find a geographic midpoint in js
function setLatLng(dataset) {
var lat = dataset.lat
var lng = dataset.lng
return new L.LatLng(lat, lng)
}
function latLngRadians(dataset) {
return _.map(dataset, function(item) {
var latRad = item.lat*(Math.PI/180)
var lngRad = item.lng*(Math.PI/180)
// ============================================================ //
// CAST
// ============================================================ //
window.chrome = {};
window.chrome.cast = {};
window.chrome.cast.isAvailable = true;
window.chrome.cast.initialize = function(a, b, c) { }
window.chrome.cast.ApiConfig = function(a, b, c) {
// This fakes that chromecast is available so the button appears
// call anything other than "available" to fake chromcast dissapearing