I'm trying to export a layer via QTiles, gotten from the Data Source Manager and connecting to ([USGSHydroCached](https://basemap.nationalmap.gov/arcgis/rest/services/USGSHydroCached/MapServer)).

I have QTiles set to zoom levels `0-20` and `Render tiles outside of layers extent` checked (basemap goes up to `20`). For some reason, the hydro layer only shows up to zoom level `17` (as per Leaflet). At zoom levels `18,19,20` the layer disappears.

QTiles is generating folders and files up to zoom level `20` (assuming this is the extent checkbox).

Is there a way to have it render the tile beyond that zoom level (poor resolution is fine)?
['https://gis.stackexchange.com/questions/317552', 'https://gis.stackexchange.com', 'https://gis.stackexchange.com/users/139763/']
The layer info at the link you provide indicates the MapServer should provide tiles up to level 19, not 20 as you'd like. But that shouldn't create problems at level 17!

However, I've played around with zooming in on the layer the QGis map window and it shows up at scales up to 1:6019, but not more detailed than that. So there's something funny with the tiles being returned by the server at levels 17+. QTiles is a red herring here, it's just that's what's asking for the layer at detailed scales.

Since it's actually a simple line layer, it would be much better if you could find a vector (rather than tile/raster) source for it. I tried a trick that often works, to try to connect to it as an ArcGisFeatureServer rather than MapServer, replacing MapServer with FeatureServer in the URI, but that didn't work. Your ideal solution would be to hunt and see a FeatureServer or WFS source for it.

Failing that, you can get a jagged version by exporting it in the region of interest at a scale that works, and then loading that into your map instead. To do that, load it in, zoom into a generous area well beyond your area of interest, right click on the layer in the layer tree and choose Export / Save as...

Then do the following; note VRT is off, click on Map Canvas Extent to set the region that will be exported, and the resolution 2.388657133974685 is chosen since that's the resolution of a Level 16 tile that works. Then use your saved .tif rather than the MapServer version.

[![enter image description here](https://i.stack.imgur.com/swbnR.png)](https://i.stack.imgur.com/swbnR.png)

If you want to get fancy, keep both layers, but make them visible at different scales via layer properties. 
And/or vectorize the raster you saved, and then style it to your heart's content (color, line thickness etc) that will then render properly at any scale level (just of course with the level of underlying detail you exported, no more no less).
As @Houska has noted the map service that you are using only provides tiles down to level 17. However, the data supplied in the map service is the [USGS National Hydrography Dataset](https://www.usgs.gov/core-science-systems/ngp/national-hydrography/access-national-hydrography-products) which is freely available to download in vector form, so if you want to generate tiles at any zoom level, this can be done by using a styled version of the vector NHD data.