hackstreetboys | Our Planet, Our Home

Waterloo, ON

Team Updates

heatmap = new google.maps.visualization.HeatmapLayer({
data: getPoints(),
map: map
});
function getPoints() {
var returnVal = [];
$.getJSON( "https://prayashm97.github.io/js/ajax/testfile.json", function( data ) {
$.each( data, function( key, val ) {
x = {
'location':new google.maps.LatLng(val.Latitude,val.Longitude), 'weight': (((val.CO2)-371)/16)
}
returnVal.push(x)
});
})
.error(function(err) { console.error(err)});
return(returnVal);
};
view raw heatmaps.js hosted with ❤ by GitHub
P
Prayash Mishra
NASA Logo

SpaceApps is a NASA incubator innovation program.