0

I recently followed this tutorial http://blog.davidelner.com/create-map-with-tilemill-and-leaflet/ that illustrated how to generate PNG tiles from Mbtile data sources. I was successful in creating the PNG tile folder dictionary on my local machine with the MBUtil utility. I wanted to know how would I serve the tiles in my .HTML document for offline use. This is what I currently have in my script but have been unsuccesful in displaying the tiles.

  var newLayer = L.tileLayer('file:///C:/Users/067626/Documents/GitHub/mbutil/libya/{z}/{x}/{y}.png', { maxZoom: 8 });
  map.addLayer(newLayer);                                                                 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.