I would like to display a map in leaflet which is in Lambert Conformal Conic. The CRS of this map is: '+proj=lcc +lat_0=38 +lon_0=-100 +lat_1=45 +lat_2=33 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs'
I do not want to warp the image into EPSG:3857 as I want the image on the web to be identical to the image as it would be printed in real life.
I've been playing around with using proj4leaflet, but I am struggling trying to figure out the resolution and origin. I don't know if this is my problem, but my pixel size is different for the x and y-direction.
Pixel Size = (262.477506424478293,-262.465501517241137)
My original image size is:
Size is 18509, 11441
So, given a 262.477506 and -262.4655 I would think at zoom level 0 with a 256x256 tile, my resolution (projection units (meters) to pixels) would be the total width in meters 18509*262.477506/256 would be 18,977.3287443516 meters to a pixel. But that just isn't working?
My steps are to:
gdal2tiles.py --profile raster U_S_VFR_Wall_Planning_Chart.tif -z 0-5 --xyz
Then I am using this:
var crs = new L.Proj.CRS("",'+proj=lcc +lat_0=38 +lon_0=-100 +lat_1=45 +lat_2=33 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs',
{
origin: ??
resolutions: ??
})
var mymap = L.map('mapid', {
minZoom: 0,
maxZoom: 5,
continuousWorld: true,
crs: crs,
tms: true,
noWrap: true
}).setView([26,-80], 0);
L.tileLayer('./U_S_VFR_Wall_Planning_Chart/{z}/{x}/{y}.png', {
}).addTo(mymap);
When looking at the tiles they appear to be correct: