Leaflet Local Maps not loading

Hi:
Hopefully someone can help me.

I am using a Raspberry Pi running the latest version of raspbian and have installed a leaflet local tile server and I am using the default quick-start-example.html web page provided (see below).
I have downloaded a set of tiles from thunderforest.com/transport for the specific location using jTilerDownLoader-0-6-1 and have transferred them to the Raspberry Pi. I have performed a chmod 755 -R /var/www/map/leaflet/tiles where all the tile directories reside.

As the code currently sits the tiles are not displayed. I turn on Developer Tools on Google Chrome and I see 404 errors for each tile.
If I uncomment line 19 and comment line 20 and reload the web page - the tiles get loaded.
I have tried “L.tileLayer(‘file:/var/www/map/leaflet/tiles/{z}/{x}/{y}.png’, { " AND " L.tileLayer(‘file:///var/www/map/leaflet/tiles/{z}/{x}/{y}.png’, {” both with no success.

I am at my wits end as to what is wrong.

Can any point me to the proper direction?

Thanks

Steven

2
3
4 Leaflet Example
5
6
7
8
9
10
11
12


13
14
15
54
55
56

If it helps, for accessing local resources

https://github.com/SomeoneElseOSM/OSMembedded/blob/master/Scripts/leaflet_embed.js#L17

worked for me. The line’s commented out, but worked when uncommented. Don’t be confused by curious file path; it’s because it’s on QNX. On your OS I’d expect an equivalent file:/// path that’s accessible to work.

However, that’s a solution for an embedded web page on a phone without a web server on it, so the file:/// resource is local to it. If you’re accessing the web page that you’re creating on a machine other than the web server, you’ll need to specify the tile source as something that the web browser can interpret, which might be something like "http://yourserver.com/map/{z}/{x}/{y}.png’. You can test it by browsing to one tile that you know you’ve copied over. I’m currently sat in http://a.tile.openstreetmap.org/10/508/332.png for example - you should be able to compose a similar http:// request that’s valid for the files copied to your server.

Duh!!!
Stare at a screen too long this is what happens.

thanks for the kick in the right direction.:lol: