I have implemented a map using Leaflet and tiles from a WMS-service. They offer a list of projections, where of one is usable in standard Leaflet EPSG:4326.
However, the map looks a bit distorted, and I recon one of the other projections would be better. The supplier of the maps uses EPSG:32624, but I cannot seem to get that projection right.
This is the complete list: EPSG:32624, EPSG:32619, EPSG:32620, EPSG:32621, EPSG:32622, EPSG:32623, EPSG:32624, EPSG:32625, EPSG:32626, EPSG:32627, EPSG:4326, EPSG:3413, EPSG:3575
I have a fiddle here: http://jsfiddle.net/uyrv2j7f/2/
There are two maps, top one is using desired projection, but not really working. Bottom one is using a working, but distorted projection.
I'm quite sure, that I need to edit the configuration of the crs. But to what? Where to find the info?
I have found the first part here: http://spatialreference.org/ref/epsg/wgs-84-utm-zone-24n/ - the rest I have nicked for examples using other projections.
var crs = new L.Proj.CRS('EPSG:32624',
'+proj=utm +zone=24 +ellps=WGS84 +datum=WGS84 +units=m +no_defs', {
resolutions: [
2116.670900008467,
1058.3354500042335,
529.1677250021168,
264.5838625010584,
132.2919312505292,
66.1459656252646,
26.458386250105836,
13.229193125052918,
6.614596562526459,
2.6458386250105836,
1.3229193125052918,
0.6614596562526459,
0.33072982812632296,
0.21166709000084669
],
transformation: new L.Transformation(1, -500, -1, 7017000)
});
Hope someone can help me out.
Alternatively: Leaflet works like a charm for me normally and is preferred library for the case. BUT should someone bee able to Help med out using different library, then I'd be very interested.....
UPDATE: tinproject gave some pointers, I went looking, and this version is closer to the wanted result: http://jsbin.com/rehoxu/5/edit?html,css,js,output
I'd still like inputs on how to really define the variables for the custom-projections though...