I have created a Python script to create a map which contains three layers. One is a polygon layer of administrative boundaries, one is point layer, one is an OpenLayers plugin map.
I want to export this as an image in PNG format. I do this using QgsComposition class as suggested in this link: http://docs.qgis.org/testing/en/docs/pyqgis_developer_cookbook/composer.html
However in the resulting picture it seems like the picture was exported before the OpenLayers map was fully loaded. In the picture you can see few tiles from the map while other area is full white. Is it some kind of refresh problem or I am not doing it correctly?