From 2fdae368c280e44d7c93b931a8f287d5e5387e82 Mon Sep 17 00:00:00 2001 From: Frederic Junod Date: Mon, 10 Mar 2014 17:18:04 +0100 Subject: [PATCH] Check if the EX_GeographicBoundingBox is correctly parsed --- src/ol/format/wmscapabilitiesformat.js | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/ol/format/wmscapabilitiesformat.js b/src/ol/format/wmscapabilitiesformat.js index 1498715448..c6c42043a5 100644 --- a/src/ol/format/wmscapabilitiesformat.js +++ b/src/ol/format/wmscapabilitiesformat.js @@ -127,12 +127,16 @@ ol.format.WMSCapabilities.readEXGeographicBoundingBox_ = /** @type {ol.format.EXGeographicBoundingBoxType} */ ({}), ol.format.WMSCapabilities.EX_GEOGRAPHIC_BOUNDING_BOX_PARSERS_, node, objectStack); - return [ - geographicBoundingBox.westBoundLongitude, - geographicBoundingBox.southBoundLatitude, - geographicBoundingBox.eastBoundLongitude, - geographicBoundingBox.northBoundLatitude - ]; + if (goog.isDef(geographicBoundingBox)) { + return [ + geographicBoundingBox.westBoundLongitude, + geographicBoundingBox.southBoundLatitude, + geographicBoundingBox.eastBoundLongitude, + geographicBoundingBox.northBoundLatitude + ]; + } else { + return undefined; + } };