<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Did you include the definition for EPSG:27700 somewhere in your
    code?<br>
    <br>
    <pre style="color: rgb(0, 0, 0); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; word-wrap: break-word; white-space: pre-wrap; ">Proj4js.defs["EPSG:27700"] = "+proj=tmerc +lat_0=49 +lon_0=-2 +k=0.9996012717 +x_0=400000 +y_0=-100000 +ellps=airy +datum=OSGB36 +units=m +no_defs";</pre>
    <br>
    Mike<br>
    <br>
    <div class="moz-cite-prefix">On 23/10/2012 8:08 AM, Thomas Colley
      wrote:<br>
    </div>
    <blockquote
cite="mid:3303607C363326428068EA203A921FA305A0C810@EMAIL.neath-porttalbot.gov.uk"
      type="cite">
      <meta http-equiv="Context-Type" content="text/html;
        charset=us-ascii">
      <meta name="Generator" content="Microsoft Word 14 (filtered
        medium)">
      <div class="WordSection1">
        <p class="MsoNormal">Hi</p>
        <p class="MsoNormal"><br>
          I have created an OpenLayers map with print functionality
          using the GeoExt.ux.PrintPreview.</p>
        <p class="MsoNormal">&nbsp;</p>
        <p class="MsoNormal">This was working fine until I added the
          proj4js script to the page. Now clicking on the Print button
          gives me the following error</p>
        <p class="MsoNormal">&nbsp;</p>
        <p class="MsoNormal"><span>TypeError: p.proj is undefined</span></p>
        <table class="MsoNormalTable">
          <tbody>
            <tr>
              <td>
                <p class="MsoNormal"><img
                    src="cid:part1.03080201.04040506@dmsolutions.ca"
                    alt="Description:
                    chrome://firebug/content/blank.gif" height="32"
                    width="32"><span></span></p>
              </td>
              <td>
                <p class="MsoNormal"><span>if (window.Proj4js &amp;&amp;
                    this.proj.defData &amp;&amp; p.proj.defData) {</span></p>
              </td>
            </tr>
          </tbody>
        </table>
        <p class="MsoNormal">&nbsp;</p>
        <p class="MsoNormal">When I click on the Print button &#8216;p&#8217; is
          coming back in Firebug as the value &#8216;EPSG:4326&#8217; instead of an
          OpenLayers.Projection object as it does at all other times
          when viewing the map.</p>
        <p class="MsoNormal">&nbsp;</p>
        <p class="MsoNormal">So the main problem is that something is
          passing projection through as a value instead of an object so
          that projection.proj is undefined, and a further problem is
          that the value is for the wrong EPSG anyway as my map is all
          in ESPG:27700.</p>
        <p class="MsoNormal">&nbsp;</p>
        <p class="MsoNormal">Is there somewhere else within the code
          that I need to define the projection? It is correctly defined
          in the map and comes back as</p>
        <p class="MsoNormal">&nbsp;</p>
        <p class="MsoNormal"><span>EPSG:27700 { projCode=</span><span>"EPSG:27700"</span><span>,
            proj={...}, titleRegEx=RegExp, more...} </span></p>
        <p class="MsoNormal"><span>&nbsp;</span></p>
        <p class="MsoNormal"><span>in firebug.</span></p>
        <p class="MsoNormal"><span>&nbsp;</span></p>
        <p class="MsoNormal"><span>I have edited the code in OpenLayers
            &#8216;Projection.js&#8217; to make &#8216;p = new
            OpenLayers.Projection("EPSG:27700")&#8217; and with this change
            the print preview window appears as it should.</span></p>
        <p class="MsoNormal"><span>&nbsp;</span></p>
        <p class="MsoNormal"><span>Hope somebody can help as I am stuck
            on this.</span></p>
        <p class="MsoNormal"><span>&nbsp;</span></p>
        <p class="MsoNormal"><span>Many thanks</span></p>
        <p class="MsoNormal"><span>&nbsp;</span></p>
        <p class="MsoNormal"><span>Tom</span></p>
        <p class="MsoNormal">&nbsp;</p>
        <p class="MsoNormal">&nbsp;</p>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@geoext.org">Users@geoext.org</a>
<a class="moz-txt-link-freetext" href="http://www.geoext.org/cgi-bin/mailman/listinfo/users">http://www.geoext.org/cgi-bin/mailman/listinfo/users</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>