title: Leaflet rendering tiles from device's local storage
body: <p>I am trying to build an android app using leaflet which can work offline with tiles stored locally on the device's sd card. Is this possible and is there a recommended way to reference the local drive in the url? I have tried all combinations but it fails to load the tiles. I do have a similar app built using OSMdroid that works just fine retrieving the locally stored tiles. I am just trying to get the same working using leaflet.</p>
  
  <p>Any suggestions or is this just not possible?
  Thanks!</p>
  
  <p>My app activity's onCreate:</p>
  
  <pre><code>    @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
          mWebView= (WebView)findViewById(R.id.mapview);
          mWebView.setWebChromeClient(new WebChromeClient());
          mWebView.loadUrl("file:///android_asset/map.html");
      }
  </code></pre>
  
  <p>I have the map.html in assets folder along with leaflet.js. Below is a snippet of my map.html:(I think the issue is with the url - /sdcard/osmdroid/...)</p>
  
  <pre><code>&lt;script&gt;
  
      var map = L.map('map');
  
      L.tileLayer('/sdcard/osmdroid/', {
          attribution: 'Map data from MOBAC',
          maxZoom: 18
      }).addTo(map);
      map.locate({setView: true, maxZoom: 16});
      function onLocationFound(e) {
          var radius = e.accuracy / 2;
  
          L.marker(e.latlng).addTo(map)
          .bindPopup("You are within " + radius + " meters from this point").openPopup();
  
          L.circle(e.latlng, radius).addTo(map);
      }
  
  &lt;/script&gt;
  </code></pre>
  
  <p></p>