Make vector-layer example ignore XHR errors

This is a workaround for our check-example.js PhantomJS script to work with this example. Without this check-example.js fails because xhr.status is 0. I tried to give the explicit file:/// scheme as indicated in https://groups.google.com/d/msg/phantomjs/wFGme0pE-Tk/WUjU5s-27NwJ, but that didn't work for me.
This commit is contained in:
Éric Lemoine
2013-03-15 15:46:40 +01:00
parent a34adc6f62
commit 51625b8008

View File

@@ -51,8 +51,6 @@ xhr.onload = function() {
// this is silly to have to tell the layer the destination projection
var projection = map.getView().getProjection();
vector.parseFeatures(xhr.responseText, geojson, projection);
} else {
throw new Error('Data loading failed: ' + xhr.status);
}
};
xhr.send();