1

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?

closed as off-topic by PolyGeo Jun 17 '18 at 8:03

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "When seeking help to debug/write/improve code always provide the desired behavior, a specific problem/error and the shortest code (as formatted text, not pictures) needed to reproduce it in the question body. Providing a clear problem statement and a code attempt helps others to help you." – PolyGeo
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 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.