[GIS] Leaflet + proj4js + EPSG:2180

leafletproj

I'm trying to add a WMS layer in EPSG:2180.

I get the definition for EPSG:2180 from here and I am using this guide on GitHub to
make a new CRS definition, but I think it is corrupted. It is not working properly.

I made an example at jsfiddle, so if someone can have a look at it I will be grateful.

I want to know how to display wms layers with leaflet in EPSG:2180

Updated example with only one map with corruped CRS definition.

http://jsfiddle.net/udsE2/4/

Old example with 3 maps, on second map is same layer like in third but in EPSG:4326

http://jsfiddle.net/udsE2/3/

Best Answer

I think your definition of EPSG:2180 is not complete. It should look like this:

new L.Proj.CRS('EPSG:2180',
  '+proj=tmerc +lat_0=0 +lon_0=19 +k=0.9993 +x_0=500000 +y_0=-5300000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs',
  {
    resolutions: [8192, 4096, 2048],
  }
);

I found the great resource to check a Proj4 definition string for the projection to use: http://epsg.io/2180 -> at the bottom of the page, on the left column 'Export' you can find ready to use string transformation.