Defining and including local tileLayer in Leaflet

المشرف العام

Administrator
طاقم الإدارة
I have a problem with including path of the local tileLayer (generated in OpenStreetMap) in Leaflet.

Here is the code in which I define path to the map.png

var map = L.map('map', { zoom: 8, layers: L.tileLayer('/tiles/{z}/{x}/{y}.png') }); Errors in my console:

GET http://192.168.1.1:3000/tiles/8/139/92.png 404 (Not Found) 92.png:1 GET http://192.168.1.1:3000/tiles/8/139/93.png 404 (Not Found) 93.png:1 GET http://192.168.1.1:3000/tiles/8/140/92.png 404 (Not Found) 92.png:1 GET http://192.168.1.1:3000/tiles/8/139/91.png 404 (Not Found) 91.png:1 GET http://192.168.1.1:3000/tiles/8/138/92.png 404 (Not Found) 92.png:1 GET http://192.168.1.1:3000/tiles/8/138/91.png 404 (Not Found) 91.png:1 GET http://192.168.1.1:3000/tiles/8/138/93.png 404 (Not Found) 93.png:1 ....... Do I need to rename map.png file?

Thanks.



أكثر...
 
أعلى