Proj4 doesn't include some projections by default.  Include them.
MODIFY
examples/reprojection/main.js
examples/reprojection/main.js
@@ -114,7 +114,7 @@ $(function () {
node: '#map',
center: {x: 0, y: 0},
zoom: 2.5,
- gcs: gcsTable[gcs],
+ gcs: gcsTable[gcs] || gcs,
unitsPerPixel: (range[1].x - range[0].x) / 256,
clampBoundsX: false,
clampBoundsY: false,
@@ -131,7 +131,7 @@ $(function () {
gcs: 'EPSG:3857',
attribution: $('#url-list [value="' + $('#layer-url').val() + '"]').attr(
'credit'),
- minLevel: 4,
+ minLevel: query.minLevel ? parseInt(query.minLevel, 10) : 4,
keepLower: true,
wrapX: false,
wrapY: false

MODIFY
src/transform.js
src/transform.js
var proj4 = require('proj4');
+/* These projections exist in proj4 but aren't included by default. */
+proj4.Proj.projections.add(require('proj4/projections/equi'));
+proj4.Proj.projections.add(require('proj4/projections/gauss'));
+proj4.Proj.projections.add(require('proj4/projections/gstmerc'));
+proj4.Proj.projections.add(require('proj4/projections/ortho'));
var util = require('./util');
/**
@@ -614,4 +619,7 @@ transform.vincentyDistance = function (pt1, pt2, gcs, baseGcs, ellipsoid, maxIte
};
};
+/* Expose proj4 to make it easier to debug */
+transform.proj4 = proj4;
+
module.exports = transform;

Proj4 doesn't include some projections by default.  Include them.