openlayers: GeoJSON with OGC CRS URN may raise error

A GeoJSON file with a CRS will raise error Uncaught AssertionError: Assertion failed: transform should be defined and fail to load if there is no colon in the projection. For example the following will work: "crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS:84" } } but "crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" } } won’t work. Note the lack of a colon between CRS and 84.

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 29 (23 by maintainers)

Most upvoted comments

With proj4.js it’s super easy:

proj4.defs('urn:ogc:def:crs:OGC:1.3:CRS:84', proj4.defs('EPSG:4326'));