From 609e94a58a0262c357289abc682d3983761a31b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mar=C3=ADa=20Arias=20de=20Reyna?= Date: Wed, 2 Dec 2015 11:37:52 +0100 Subject: [PATCH] Adding a check just in case the projection is not defined/supported on current app. It will just ignore it, as if there was no containerSrs defined. --- src/ol/format/gml/gml2format.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ol/format/gml/gml2format.js b/src/ol/format/gml/gml2format.js index 30179f6b6b..8255e28fa7 100644 --- a/src/ol/format/gml/gml2format.js +++ b/src/ol/format/gml/gml2format.js @@ -64,7 +64,9 @@ ol.format.GML2.prototype.readFlatCoordinates_ = function(node, objectStack) { var axisOrientation = 'enu'; if (containerSrs) { var proj = ol.proj.get(containerSrs); - axisOrientation = proj.getAxisOrientation(); + if (proj) { + axisOrientation = proj.getAxisOrientation(); + } } var coords = s.split(/[\s,]+/); // The "dimension" attribute is from the GML 3.0.1 spec.