leaflet 根据缩放级别控制图层的显示
map.on('zoomend ', function (e) { let zoom = map.getZoom(); if (zoom > 10) { map.addLayer(LineLayer); } else if (zoom <= 10) { map.removeLayer(LineLayer); } });
map.on('zoomend ', function (e) { let zoom = map.getZoom(); if (zoom > 10) { map.addLayer(LineLayer); } else if (zoom <= 10) { map.removeLayer(LineLayer); } });
坐标合肥,非典型GIS开发人员 GitHub。