<html>
  <head>

  </head>
  <body style="font-style: normal; font-size: 10pt; font-family: Dialog; font-weight: normal; margin-top: 4px; margin-bottom: 1px; margin-right: 4px; font-variant: normal; margin-left: 4px; line-height: normal">
    <p style="margin-bottom: 0; margin-top: 0">
      <font face="Dialog" size="2">Hi All.</font>    </p>
<br>      
    <p style="margin-bottom: 0; margin-top: 0">
      <font face="Dialog" size="2">Thanks for the help got it working...</font>    </p>
<br>      
    <p style="margin-bottom: 0; margin-top: 0">
      <font face="Dialog" size="2">This seems to work&#44; Note used setDestinationSrs not setDestinationCrs</font>    </p>
<br>      
    <p style="margin-bottom: 0; margin-top: 0">
      <font face="Dialog" size="2">myrender &#61; self.canvas.mapRenderer&#40;&#41;</font>    </p>
    <p style="margin-bottom: 0; margin-top: 0">
      <font face="Dialog" size="2">myrender.setProjectionsEnabled&#40;True&#41; </font>    </p>
    <p style="margin-bottom: 0; margin-top: 0">
      <font face="Dialog" size="2">myrender.setDestinationSrs&#40;crsDest&#41;</font>    </p>
<br>      <br>
    <p style="margin-bottom: 0; margin-top: 0">
      <font face="Dialog" size="2">Terence</font>    </p>
    <p style="margin-bottom: 0; margin-top: 0">
      <br>
      &gt;&gt;&gt;     </p>
    <table style="font-size: 1em; margin-top: 0; margin-right: 0; margin-bottom: 0; margin-left: 15px" border="0" bgcolor="#f3f3f3">
      <tr>
        <td>
          <div style="border-left: solid 1px #050505; padding-left: 7px">
            <table style="font-size: 10pt; font-style: normal; font-family: Dialog; font-weight: normal; font-variant: normal; line-height: normal" bgcolor="#f3f3f3">
              <tr valign="top">
                <td>
                  <p style="margin-bottom: 0; margin-top: 0">
                    <b>From: </b>                  </p>
                </td>
                <td>
                  <p style="margin-bottom: 0; margin-top: 0">
                    Tim Sutton &lt;lists@linfiniti.com&gt;                  </p>
                </td>
              </tr>
              <tr valign="top">
                <td>
                  <p style="margin-bottom: 0; margin-top: 0">
                    <b>To:</b>                  </p>
                </td>
                <td>
                  <p style="margin-bottom: 0; margin-top: 0">
                    Terence Van Zyl &lt;tvzyl@csir.co.za&gt;                  </p>
                </td>
              </tr>
              <tr valign="top">
                <td>
                  <p style="margin-bottom: 0; margin-top: 0">
                    <b>CC:</b>                  </p>
                </td>
                <td>
                  <p style="margin-bottom: 0; margin-top: 0">
                    &lt;qgis-developer@lists.osgeo.org&gt;                  </p>
                </td>
              </tr>
              <tr valign="top">
                <td>
                  <p style="margin-bottom: 0; margin-top: 0">
                    <b>Date: </b>                  </p>
                </td>
                <td>
                  <p style="margin-bottom: 0; margin-top: 0">
                    3/29/2011 09:27 AM                  </p>
                </td>
              </tr>
              <tr valign="top">
                <td>
                  <p style="margin-bottom: 0; margin-top: 0">
                    <b>Subject: </b>                  </p>
                </td>
                <td>
                  <p style="margin-bottom: 0; margin-top: 0">
                    Re: &#91;Qgis-developer&#93; Getting auto re-projection on Standalone QgsMapCanvas                  </p>
                </td>
              </tr>
            </table>
            <p style="margin-bottom: 0; margin-top: 0">
              Hi again<br><br><br><br>On Tue&#44; Mar 29&#44; 2011 at 9:23 AM&#44; Tim Sutton &lt;lists@linfiniti.com&gt; wrote:<br>&gt; Howzit Terence<br>&gt;<br>&gt; The c&#43;&#43; version of what you are trying to do is something like &#40;you<br>&gt; need to have already teh myCRSID variable defined&#41;:<br>&gt;<br>&gt; QgsMapRenderer&#42; myRenderer &#61; mMapCanvas-&gt;mapRenderer&#40;&#41;&#59;<br>&gt; QgsCoordinateReferenceSystem srs&#40; myCRSID&#44;<br>&gt; QgsCoordinateReferenceSystem::InternalCrsId &#41;&#59;<br>&gt; myRenderer-&gt;setDestinationCrs&#40; srs &#41;&#59;&#92;<br><br>You probably need trunk / nightly builds to use this the above call<br>was missing from the python interface and Martin has just added it.<br><br>Regards<br><br>Tim<br><br><br>&gt; myRenderer-&gt;setMapUnits&#40; QGis::Meters &#41;&#59;<br>&gt; myRenderer-&gt;setProjectionsEnabled&#40; true &#41;&#59;<br>&gt;<br>&gt;<br>&gt; I&#39;m not a python guru but you can probably replace those :: and -&gt; &#39;s<br>&gt; with &#39;.&#39; and it should mostly work.<br>&gt;<br>&gt; Regards<br>&gt;<br>&gt; Tim<br>&gt;<br>&gt;<br>&gt; On Mon&#44; Mar 28&#44; 2011 at 4:04 PM&#44; Terence Van Zyl &lt;tvzyl@csir.co.za&gt; wrote:<br>&gt;&gt; Hi All&#44; Some help please..<br>&gt;&gt;<br>&gt;&gt; From Python I have created a standalone QgsMapCanvas to which I have added a<br>&gt;&gt; number of layers&#44; one raster and then some vector. Is there a way to get the<br>&gt;&gt; vector layers to auto reproject&#63; If Not then how would we do this manually.<br>&gt;&gt;<br>&gt;&gt; Thanks<br>&gt;&gt;<br>&gt;&gt; Terence<br>&gt;&gt;<br>&gt;&gt; --<br>&gt;&gt; This message is subject to the CSIR&#39;s copyright terms and conditions&#44; e-mail<br>&gt;&gt; legal notice&#44; and implemented Open Document Format &#40;ODF&#41; standard.<br>&gt;&gt; The full disclaimer details can be found at<br>&gt;&gt; <a href="http://www.csir.co.za/disclaimer.html.">http://www.csir.co.za/disclaimer.html.</a><br>&gt;&gt;<br>&gt;&gt; This message has been scanned for viruses and dangerous content by<br>&gt;&gt; MailScanner&#44;<br>&gt;&gt; and is believed to be clean. MailScanner thanks Transtec Computers for their<br>&gt;&gt; support.<br>&gt;&gt;<br>&gt;&gt; _______________________________________________<br>&gt;&gt; Qgis-developer mailing list<br>&gt;&gt; Qgis-developer@lists.osgeo.org<br>&gt;&gt; <a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>&gt;&gt;<br>&gt;&gt;<br>&gt;<br>&gt;<br>&gt;<br>&gt; --<br>&gt; Tim Sutton - QGIS Project Steering Committee Member &#40;Release&#160;&#32;Manager&#41;<br>&gt; &#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;<br>&gt; Please do not email me off-list with technical<br>&gt; support questions. Using the lists will gain<br>&gt; more exposure for your issues and the knowledge<br>&gt; surrounding your issue will be shared with all.<br>&gt;<br>&gt; Visit <a href="http://linfiniti.com">http://linfiniti.com</a>&nbsp;to find out about:<br>&gt;&#160;&#32;&#42; QGIS programming and support services<br>&gt;&#160;&#32;&#42; Mapserver and PostGIS based hosting plans<br>&gt;&#160;&#32;&#42; FOSS Consulting Services<br>&gt; Skype: timlinux<br>&gt; Irc: timlinux on &#35;qgis at freenode.net<br>&gt; &#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;<br>&gt;<br><br><br><br>--<br>Tim Sutton - QGIS Project Steering Committee Member &#40;Release&#160;&#32;Manager&#41;<br>&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;<br>Please do not email me off-list with technical<br>support questions. Using the lists will gain<br>more exposure for your issues and the knowledge<br>surrounding your issue will be shared with all.<br><br>Visit <a href="http://linfiniti.com">http://linfiniti.com</a>&nbsp;to find out about:<br>&#42; QGIS programming and support services<br>&#42; Mapserver and PostGIS based hosting plans<br>&#42; FOSS Consulting Services<br>Skype: timlinux<br>Irc: timlinux on &#35;qgis at freenode.net<br>&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;&#61;<br>
            </p>
          </div>
        </td>
      </tr>
    </table>
  <font face="Verdana,Arial,Helvetica,Trebuchet MS" size="1">
<br />-- 
<br />This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard.
<br />The full disclaimer details can be found at <a href="http://www.csir.co.za/disclaimer.html">http://www.csir.co.za/disclaimer.html</a>.
<p>
<br />This message has been scanned for viruses and dangerous content by <a href="http://www.mailscanner.info/"><b>MailScanner</b></a>, 
<br />and is believed to be clean.  MailScanner thanks <a href="http://www.transtec.co.uk/">Transtec Computers</a> for their support.
</font>
</body>
</html>