Thanks Larry, that's what I was looking for!<br><br><div class="gmail_quote">On Wed, Apr 4, 2012 at 9:47 PM, Larry Shaffer <span dir="ltr"><<a href="mailto:larrys@dakotacarto.com">larrys@dakotacarto.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Aaron,<br><br><div class="gmail_quote"><div><div class="h5">On Wed, Apr 4, 2012 at 5:27 PM, SJWC GIS <span dir="ltr"><></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello, I'm creating a plugin that modifies the qgis interface defaults when it's installed. One of the things I'm trying to do is turn on the overview map by default. I haven't found a way to do it yet. I could only get as close as...<div>
<br></div><div>self.iface.mapCanvas().enableOverviewMode(QgsMapOverviewCanvas(None, self.iface.mapCanvas())) </div><div><br></div>
<div>This ends up crashing qgis altogether. I'm guessing it has something to do with the fact that I have no reference to the existing overview map object, and trying to create a new one is bad news. Any insight you could provide on the best way to accomplish such things (and where in the api I can look for answers like this) would be much appreciated. Thanks!</div>
</blockquote></div></div><div><br>I think the overview object is already created on project load (if the project has one).<br><br>If you are looking to just show/hide it's dock widget, try...<br><br> overview = iface.mainWindow().findChild(QDockWidget, "Overview")<br>
if overview:<br>
overview.show() # or hide(), etc.<br><br>Regards,<br><br>Larry Shaffer<br>Dakota Cartography<br>Black Hills, South Dakota <br></div></div><br>
</blockquote></div><br>