Which stops the quakes layer loading.
The esri.request method requires a web server running hosting the example and a proxy page to call the quakes XML service:
function requestQuakes(){
esri.config.defaults.io.proxyUrl = "proxy.php"; //relative - if proxy.php is in the same application as the web page
var requestHandle = esri.request({
url: "http://earthquake.usgs.gov/earthquakes/feed/geojson/1.0/week",
load: requestSucceeded,
error: requestFailed
}, {
useProxy: true // changed from True
});
}
I'm using a php proxy that I downloaded from ArcGIS.
When I run it under the EasyPHP server that error came up.
I chased the error down to the proxy.php script echoing out error messages due to uninitialized variables and missing keys from arrays. Once I had eliminated those errors the page loaded correctly. It seems the error messages were getting returned with the usgs earthquakes JSON and messing up the dojo JSON parser.
The new proxy.php
The new proxy.php