I'm successfully loading several layers with Python, but can only get to see them in the map window if I manually zoom to extent afterwards.
Once the last layer is loaded I call zoom to extent in the code on the layer, but it seems not to have an effect. Ending the loading with iface.mapCanvas().refresh() similarly have no effect.
I've looked at these two related Q&As:
- Load and display a layer from SQL Server using PyQGIS and
but not found an answer to why I can't see the layer. What am I missing?