Skip to content

Instantly share code, notes, and snippets.

@normansolutions
Created January 7, 2014 13:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save normansolutions/8299293 to your computer and use it in GitHub Desktop.
Save normansolutions/8299293 to your computer and use it in GitHub Desktop.
window.eqfeed_callback = function (results) {
var strHtml = '<ul>';
for (var i = 0; i < results.features.length; i++) {
var earthquake = results.features[i];
var coords = earthquake.geometry.coordinates;
var latLng = new google.maps.LatLng(coords[1], coords[0]);
var marker = new google.maps.Marker({
position: latLng,
map: map,
icon: getCircle(earthquake.properties.mag)
});
if (i < 10) {
strHtml += '<li><a target = "_blank" href=' + earthquake.properties.url + ' title=' + earthquake.properties.place + '>Magnitude: ' + earthquake.properties.mag + 'Md - ' + earthquake.properties.place + ' at ' + formatAMPM(new Date(earthquake.properties.time)) + '</a></li>';
};
}
strHtml += '</ul>';
$("#earthQuake").html(strHtml);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment