javascript - Leaflet map not loading tiles -


my code:

<!doctype html> <html> <head>     <title>openttd map</title>     <meta charset="utf-8" />     <meta name="viewport" content="width=device-width, initial-scale=1.0">     <link rel="stylesheet" href="https://npmcdn.com/leaflet@1.0.0-rc.3/dist/leaflet.css" />     <script src="https://npmcdn.com/leaflet@1.0.0-rc.3/dist/leaflet.js"></script> </head> <body>     <div id="map" style="width: 1600px; height: 900px"></div>     <script>          var tile_url = 'http://dev.ruun.nl/zelf/openttd/tiles/map_{x}_{y}.png';          var map = l.map('map', {           maxzoom: 20,           minzoom: 20,           crs: l.crs.simple         }).setview([0, 0], 20);         //65409x32839         var southwest = map.unproject([0, 32839], map.getmaxzoom());         var northeast = map.unproject([65409, 0], map.getmaxzoom());         map.setmaxbounds(new l.latlngbounds(southwest, northeast));         l.tilelayer(tile_url, {             attribution: 'map data &copy; ieuan\'s openttd world',                 continuousworld: true,             tilesize: 256         }).addto(map);      </script> </body> </html> 

for reason tiles aren't loading, map showing grey. they're not being downloaded browser , i'm not getting error messages

the tiles 256x256 parts of 65409x32839 screenshot

url view http://dev.ruun.nl/zelf/openttd/

you have explicitly specify tile layer maxzoom option 20, otherwise default value of 18, prevents tiles being called @ zoom (20).

demo: http://plnkr.co/edit/0654usix33jj5hj4eqt4?p=preview


Comments

Popular posts from this blog

Spring Boot + JPA + Hibernate: Unable to locate persister -

go - Golang: panic: runtime error: invalid memory address or nil pointer dereference using bufio.Scanner -

c - double free or corruption (fasttop) -