examples/js/earthquakes.js
function () {

        if (lastLayer) {
            map.removeLayer(lastLayer);
        }

        $.ajax({
            //url: 'http://earthquake.usgs.gov/earthquakes/feed/geojsonp/all/day',
            url: 'http://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/all_day.geojsonp',
            type: 'GET',
            dataType: 'jsonp',
            jsonp: false
        });
    }
function () {

        if (lastLayer) {
            map.removeLayer(lastLayer);
        }

        $.ajax({
            //url: 'http://earthquake.usgs.gov/earthquakes/feed/geojsonp/all/day',
            url: 'http://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/all_day.geojsonp',
            type: 'GET',
            dataType: 'jsonp',
            jsonp: false
        });
    }
function ( ) { if ( lastLayer ) { map . removeLayer ( lastLayer ) ; } $ . ajax ( { //url: 'http://earthquake.usgs.gov/earthquakes/feed/geojsonp/all/day', url : 'http://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/all_day.geojsonp' , type : 'GET' , dataType : 'jsonp' , jsonp : false } ) ; }
Function for requesting the latest earthquakes from USGS
Function for requesting the latest earthquakes from USGS