From b7ed585e3183961680dcddd275f2af72abe87c18 Mon Sep 17 00:00:00 2001 From: Tim Schaub Date: Tue, 21 Jan 2014 09:27:59 -0700 Subject: [PATCH] Reminder to remove workaround when GeoServer GeoJSON issue is fixed See #1566 and http://jira.codehaus.org/browse/GEOS-5996 --- externs/geojson.js | 6 ++++++ src/ol/format/geojsonformat.js | 2 ++ test/spec/ol/format/geojsonformat.test.js | 2 ++ 3 files changed, 10 insertions(+) diff --git a/externs/geojson.js b/externs/geojson.js index 46869a4ff2..bec6c7b428 100644 --- a/externs/geojson.js +++ b/externs/geojson.js @@ -35,6 +35,8 @@ var GeoJSONCRS = function() {}; /** * @type {!GeoJSONCRSCode|!GeoJSONCRSName|!GeoJSONLink} + * TODO: remove GeoJSONCRSCode when http://jira.codehaus.org/browse/GEOS-5996 + * is fixed and widely deployed. */ GeoJSONCRS.prototype.properties; @@ -43,6 +45,8 @@ GeoJSONCRS.prototype.properties; /** * `GeoJSONCRSCode` is not part of the GeoJSON specification, but is generated * by GeoServer. + * TODO: remove GeoJSONCRSCode when http://jira.codehaus.org/browse/GEOS-5996 + * is fixed and widely deployed. * @constructor */ var GeoJSONCRSCode = function() {}; @@ -50,6 +54,8 @@ var GeoJSONCRSCode = function() {}; /** * @type {string} + * TODO: remove this when http://jira.codehaus.org/browse/GEOS-5996 is fixed + * and widely deployed. */ GeoJSONCRSName.prototype.code; diff --git a/src/ol/format/geojsonformat.js b/src/ol/format/geojsonformat.js index daaa6a242d..25da9d16e3 100644 --- a/src/ol/format/geojsonformat.js +++ b/src/ol/format/geojsonformat.js @@ -373,6 +373,8 @@ ol.format.GeoJSON.prototype.readProjection = function(object) { } else if (crs.type == 'EPSG') { // 'EPSG' is not part of the GeoJSON specification, but is generated by // GeoServer. + // TODO: remove this when http://jira.codehaus.org/browse/GEOS-5996 + // is fixed and widely deployed. return ol.proj.get('EPSG:' + crs.properties.code); } else { goog.asserts.fail(); diff --git a/test/spec/ol/format/geojsonformat.test.js b/test/spec/ol/format/geojsonformat.test.js index deef17769d..28d6b39f47 100644 --- a/test/spec/ol/format/geojsonformat.test.js +++ b/test/spec/ol/format/geojsonformat.test.js @@ -392,6 +392,8 @@ describe('ol.format.GeoJSON', function() { }); it('can read out-of-specification CRS generated by GeoServer', function() { + // TODO: remove this when http://jira.codehaus.org/browse/GEOS-5996 + // is fixed and widely deployed. var json = { crs: { type: 'EPSG',