<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-15">
<META content="MSHTML 6.00.2900.3243" name=GENERATOR></HEAD>
<BODY style="MARGIN: 4px 4px 1px">
<DIV>Dear Michael</DIV>
<DIV>&nbsp;</DIV>
<DIV>You need to tell OL which projection to request in within the map object. This is how I do it:</DIV>
<DIV>&nbsp;</DIV>
<DIV>var mapoptions = {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; maxExtent: new OpenLayers.Bounds(773500, 4555450, 2602100, 6384050),<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; units: 'm',<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; projection: "EPSG:2193",<BR>&nbsp;&nbsp;&nbsp; };<BR>&nbsp;&nbsp;&nbsp; map = new OpenLayers.Map( 'map',mapoptions );</DIV>
<DIV>&nbsp;</DIV>
<DIV>Then my layer is something like this:</DIV>
<DIV>&nbsp;</DIV>
<DIV>var topochwms = new OpenLayers.Layer.WMS( "Topos (Chathams)",<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "<A href="http://myserver/cgi-bin/gsswms.exe">http://myserver/cgi-bin/gsswms.exe</A>?",<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {layers: ['ci250k','ci50kcitm'], transparent: 'true',format: "image/png"},<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {singleTile: true, isBaseLayer: true, visibility: true} );</DIV>
<DIV>map.addLayer(topochwms);</DIV>
<DIV>&nbsp;</DIV>
<DIV>regards,</DIV>
<DIV>&nbsp;</DIV>
<DIV>Robert</DIV>
<DIV><BR>&gt;&gt;&gt; "Michael G." &lt;michael.gajda@tu-dortmund.de&gt; 11/08/2011 11:41 a.m. &gt;&gt;&gt;<BR>Hi,<BR><BR>since a couple of days we try visualize data from a postgis database using<BR>mapserver and openlayers. As far as we know is our postgis data in EPSG:25832<BR>and our mapfile for mapserver looks like this:<BR><BR><A href="http://dpaste.com/hold/591626/">http://dpaste.com/hold/591626/</A><BR><BR>Now we have created an index.html containing the following JS snippet:<BR><BR><A href="http://dpaste.com/hold/591627/">http://dpaste.com/hold/591627/</A><BR><BR>We can test the WMS using a direct WMS URL to our MapServer and asking for<BR>EPSG:25832 and the correct extends, and it displays the map just fine<BR>(Everything is protected so I cannot provide this URL here).<BR><BR>If we try to display the map using the openlayers code above we do not see<BR>anything at all. You can zoom and move it around but that's<BR>everthing you get with openlayers. Networkdebugging tools tell me, that<BR>OpenLayers by default is requesting that google projection of EPSG:3867. But<BR>even providing coordinates that should somehow be in Dortmund it does only<BR>display the backgroundcolor.<BR><BR>Maybe you can help me clearing up a few things. Like the list of projections<BR>in 'wms_srs' is what MapServer provides via WMS. And the PROJECTION entry on<BR>the 'LAYER' level should be set to the projection of my data. Correct? And<BR>the PROJECTION on the MAP level is ignored? Does MapServer automatically<BR>convert the coordinates? MapServer requires to have EXTEND set. Which<BR>projection should I use? The one defined at MAP level?<BR><BR>Best regards,<BR>Michael<BR>_______________________________________________<BR>mapserver-users mailing list<BR>mapserver-users@lists.osgeo.org<BR><A href="http://lists.osgeo.org/mailman/listinfo/mapserver">http://lists.osgeo.org/mailman/listinfo/mapserver</A>-users<BR></DIV><br><br>
<P align=center><FONT style="BACKGROUND-COLOR: #ffffff">This email and any attachments are confidential and intended solely for the addressee(s). If you are not the intended recipient, please notify us immediately and then delete this email from your system.</FONT></P>

<P align=center><FONT style="BACKGROUND-COLOR: #ffffff">This message has been scanned for Malware and Viruses by Websense Hosted Security.  </FONT><A href="http://www.websense.com/"><FONT style="BACKGROUND-COLOR: #ffffff" color=#000000>www.websense.com</FONT></A></P>
</body></HTML>