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:

but not found an answer to why I can't see the layer. What am I missing?

  • Is this in QGIS or in a standalone app? – Nathan W Mar 31 '14 at 3:02
  • I'm doing this from a plugin to QGIS, so that counts as in QGIS(?) – user28233 Mar 31 '14 at 6:16

Browse other questions tagged or ask your own question.