kartena / Proj4Leaflet

Smooth Proj4js integration with Leaflet.
http://kartena.github.io/Proj4Leaflet/
BSD 2-Clause "Simplified" License
589 stars 173 forks source link

Support for World Eckert IV? #150

Closed iboates closed 7 years ago

iboates commented 7 years ago

I have a class assignment where we are supposed to project some data in a leaflet map that is defined in World Eckert IV. I'm having trouble getting the map to project. I have defined my coordinate system like so:

var crs = new L.Proj.CRS('ESRI:54012',
    '+proj=eck4 +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ',
    {
        resolutions: [8192, 4096, 2048, 1024, 512, 256, 128],
        origin: [0, 0]
    });

But I am getting a uncaught exception: ESRI:54012 error.

Is this right? or is World Eckert IV not supported? According to epsg.io, this is the right code.

perliedman commented 7 years ago

Hi there, thanks for reporting. I believe this is better addressed to Proj4js, the underlying projection library used by Proj4Leaflet: Proj4Leaflet is just the glue between Leaflet and Proj4js, the actual projection calculations are done by Proj4js.

A quick look at the projections supported by Proj4js, it seems eck4 simply isn't supported by Proj4js, but I could be mistaken.