From 51625b8008f3c5466f0e19a377f6f37f48259b6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Lemoine?= Date: Fri, 15 Mar 2013 15:46:40 +0100 Subject: [PATCH] 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. --- examples/vector-layer.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/examples/vector-layer.js b/examples/vector-layer.js index 671cc5a663..d91bb83ba6 100644 --- a/examples/vector-layer.js +++ b/examples/vector-layer.js @@ -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();