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:
@@ -51,8 +51,6 @@ xhr.onload = function() {
|
|||||||
// this is silly to have to tell the layer the destination projection
|
// this is silly to have to tell the layer the destination projection
|
||||||
var projection = map.getView().getProjection();
|
var projection = map.getView().getProjection();
|
||||||
vector.parseFeatures(xhr.responseText, geojson, projection);
|
vector.parseFeatures(xhr.responseText, geojson, projection);
|
||||||
} else {
|
|
||||||
throw new Error('Data loading failed: ' + xhr.status);
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
xhr.send();
|
xhr.send();
|
||||||
|
|||||||
Reference in New Issue
Block a user