Prevent Leaflet from requesting non-existing custom tiles

المشرف العام

Administrator
طاقم الإدارة
I have created custom tiles using TileMill. extracted tiles as png images and adding them on base layer. using following code

var venu_map = new L.tileLayer('static/b18/{z}/{x}/{y}.png', { maxZoom:22, attribution: '© OpenStreetMap contributors' }).addTo(map);It works fine. But for every zoomlevel change leaflet makes a number of(around 20 -30) requests to non existing tiles resulting in "NetworkError: 404 NOT FOUND. Complete error msg is "NetworkError: 404 NOT FOUND - http://127.0.0.1:8000/static/b18/16/47372/30375.png". The particular image does not exist. Even after setting maxbounds this error show up. Any solutions?



أكثر...
 
أعلى