I did a world map in Geoserver, showing in Leaflet in the default projection, which is EPSG:900913 (aka GOOGLE Mercator) but I would like to use the Mollweide projection instead.
I successfully added this grid in Geoserver:
Name: moll - EPSG:54009 - Extents: -19,844,105 / -9,922,053 / 19,844,105 / 9,922,053 - Tiles : 256x256 - Resolutions: 65,536 - 32,768 - 16,384 - 8,192 - 4,096 - 2,048 - 1,024 - 512 - 256 - 128
I applied the gridset to my layer collection in its settings, and I have a result that I accept, inside Geoserver pointing to the 54009 epsg:
And though I could load a json data in a Leaflet window, that wms layer won't work. I have working script links to "proj4js-compressed.js" and "proj4leaflet.js" and an exemple world countries layer "countries-110m.js"
map crs is set to
var crs = new L.Proj.CRS('EPSG:54009', '+proj=moll +lon_0=0 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs', {
resolutions: [65536, 32768, 16384, 8192, 4096, 2048, 1024, 512, 256, 128]
});
var map = L.map('map', {
crs: crs,
maxZoom: 8
});
The Geojson is loading :
L.geoJson(countries, {
style: {
color: '#000',
weight: 0.5,
opacity: 0.2,
fillColor: '#fff',
fillOpacity: 0.2
}
}).addTo(map);
the WMS tilelayer is not:
var mapbase = L.tileLayer.wms('http://mappingforyou.eu/geoserver/wms?', {
layers: 'pays.monde',
maxZoom: 20,
crs: crs,
format: 'image/png',
attribution: '↖Menu . Categories↗)'
}).addTo(map);
The browser console is not showing any error. Can you help me please?