Read projection from CRS type EPSG

CRS also may have type 'EPSG' and then the code is reading from property 'code' in object 'properties'
This commit is contained in:
wussup
2020-01-15 10:13:18 +01:00
committed by GitHub
parent 56a6919d9a
commit bc6f34d691

View File

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