kartena / Proj4Leaflet

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

Question: EPSG:3031, no "stere" in proj4.js #47

Closed mike-mcgann closed 10 years ago

mike-mcgann commented 10 years ago

I've noticed that the proj4.js provided with Proj4Leaflet does not have "stere" included which is used in the definition of EPSG:3031 (Antarctic Polar Stereographic). It does have "sterea" but it does not appear to be a drop-in replacement. While I don't completely understand the differences between the two, EPSG:3031 was not working for me when using "sterea" and would give an NaN value when getting the view extent. I hacked the "stere" support back into the provided proj4.js and everything seemed to work fine.

I'm not sure what the origin of the distributed proj4.js is in this project. Is it just a require.js-ified version of the NPM? Is there anyway "stere" could be included back in?

perliedman commented 10 years ago

Then Proj4js packaged with the latest Proj4Leaflet is from the "new" Proj4js, maintained on GitHub: https://github.com/proj4js/proj4js, It is version 1.3.4.

I'm would guess they would be very happy if you submit more projection support to them!

mike-mcgann commented 10 years ago

Looking around, it seems that the support for that was newer than I originally thought. In version 1.3.4, it is not there:

https://github.com/proj4js/proj4js/blob/d2dc80236b20c5a2753524b0ed2b1707a4954292/proj4/projections.js

But in 1.4.0 it is:

https://github.com/proj4js/proj4js/blob/fd8c1806862814b637551e8d02b9274d501c7b06/proj4/projections.js

I'll just try a newer distribution and it should work. Thanks.