I have successfully been using Klokan Petr Pridal's MapTiler (http://maptiler.org ) to take GeoTiff files and create TMS tile pyramids for Leaflet (option #1 which projects to EPSG3857, also called Google Maps compatible Spherical Mercator).

But my source data is in EPSG 4326, so I am now using option #3 for WGS84 Plate Caree (Geodetic). I believe it is using gdal2tiles under the hood.

The issue I have is that I do not see any of these overlay tiles in Leaflet. Even though am being careful to make sure the map is created with the right CRS.

I have tried tuning TMS: false, and TMS: true. No luck.

One thing I see is that the numbering even for the top levels z/x/y is weird: (e.g. 0/1/2.png ). Should a Krakow, Poland map really be at coordinates: 5/35/24? or 10/1136/795?

With the Spherical Mercator I have 10/568/346!!!

Also, all the specs for TMS tile numbering that I have seen are only good for EPSG3857 (spherical Mercator) which I believe has bounds of _85/-85 lat. But EPSG4326 would go to 90. So what gives in the numbering?

var map;
var krakowLayer = null;
var mapOptions = {
    center: new L.LatLng(0, 0),
    zoom: 1,
    tms: true,
    crs: L.CRS.EPSG4326
    map = new L.Map('map', mapOptions);
    krakowLayer = new L.TileLayer("./tiles4326/{z}/{x}/{y}.png", { tms: false, opacity: 0.8 });

function addLayers() {
    var baseLayers = {
        "CloudMade": cloudLayer,
    var overlays = {
        "Krakow Layer": krakowLayer
    L.control.layers(baseLayers, overlays).addTo(map);

2 Answers 2


I think you should run maptiler again. Maptiler can project your data, you should take the first option in maptiler "Google Maps Compatible". It will project your data to EPSG:3857. In EPSG:4326 your data will look very warped, in EPSG:3857 won't have any problems with leaflet + you will be able it combine it with OSM, Google etc.

I don't remember if you need to set tms to true or false, try both.

  • 1
    Sorry, But Spherical Mercator (3857) is where it looks warped. Yes it displays fine, numbering is fine. but the native imagery is in 4326, so gdal2tiles is warping it to 3857. Since Leaflet claims CRS 4326, I want to use it (there is a bug issue listed in github about this)
    – Dr.YSG
    Commented Jan 27, 2013 at 2:07

I was able to solve this by not using maptiler. I have a copy of SAFE FME, and I used it's ll84 SLIPPY tile generator (WebMapTiler) to create the tiles.

You can see my results in this post:

Leaflet and EPSG 4326 Projections

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.