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.

This commit is contained in:
María Arias de Reyna
2015-12-02 11:37:52 +01:00
parent 652638e902
commit 609e94a58a

View File

@@ -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.