From bc6f34d691016cbc7bcd37bd3804a01d2af28f16 Mon Sep 17 00:00:00 2001 From: wussup Date: Wed, 15 Jan 2020 10:13:18 +0100 Subject: [PATCH] Read projection from CRS type EPSG CRS also may have type 'EPSG' and then the code is reading from property 'code' in object 'properties' --- src/ol/format/GeoJSON.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/ol/format/GeoJSON.js b/src/ol/format/GeoJSON.js index 8448457c1e..a45907f95e 100644 --- a/src/ol/format/GeoJSON.js +++ b/src/ol/format/GeoJSON.js @@ -162,6 +162,8 @@ class GeoJSON extends JSONFeature { if (crs) { if (crs['type'] == 'name') { projection = getProjection(crs['properties']['name']); + } else if (crs['type'] === 'EPSG') { + projection = getProjection("EPSG:" + crs['properties']['code']); } else { assert(false, 36); // Unknown SRS type }