I have installed leaflet to create a web site for consulting data created by firefighters in France.

I want to test the plugin leaflet.multitilelayer for defining a TileLayer in terms of several TileServer urls. I have tested this plugin with data of others: it works (the example is here : http://makina-corpus.com/blog/metier/2013/infrastructure-webmapping-minimaliste-partie-3-leaflet). But when I have tested with our data (with server of spatial data GeoServer and MapServer to create TMS), it doesn't work. It seems that the coordinates are note the good, because I have compared with the simple L.tilayer.

Here is our code :

 var PLAN  = 
    17: { // this layer is shown at zoomlevels between maxZoom of 
          // previous layer and 17 (ie 17)
        url: 'http://xxx.XXX.XXX.XXX/geowebcache/service/tms/1.0.0/[our_data]/{z}/{x}/{y}.png',       
     19: { // this layer is shown at zoomlevels between minZoom and 19 (ie 18,19)
        url: 'httpxxx.XXX.XXX.XXX/geowebcache/service/tms/1.0.0/[our_data]/{z}/{x}/{y}.png',
}, {
minZoom: 17,
maxZoom: 19,

When I use the command L.tileLayer for these TMS, it works well.

Would anyone ever had this problem?

1 Answer 1


Bienvenue sur GIS SE !

As stated on Leaflet.MultiTileLayer plugin home page (on Feb 2013):


This was an evening hack trying to package a solution for something that we did at Kartena. A few days after I finished it I found another, much simpler, solution that can be seen in this jsfiddle. You should probably use that approach instead. However if you find any usages for this, please let me know.

You can use much simpler ways now with Leaflet, even though in your case it might appear slightly more complicated (but it avoids that complicated outdated plugin).

For instance, you could simply use 2 Tile Layers with individual minZoom and maxZoom options, so that they appear only on the corresponding zoom levels, as done in the quoted JSFiddle.

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.