Improve XHR and ol.net.jsonp result/failure handling

This commit is contained in:
Andreas Hocevar
2016-02-02 17:53:49 +01:00
parent e48ab95735
commit 78f44dcc8a
4 changed files with 27 additions and 8 deletions

View File

@@ -75,7 +75,7 @@ ol.featureloader.loadFeaturesXhr = function(url, format, success, failure) {
* @private
*/
xhr.onload = function(event) {
if (xhr.status < 400) {
if (xhr.status >= 200 && xhr.status < 300) {
var type = format.getType();
/** @type {Document|Node|Object|string|undefined} */
var source;