<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<br>
<blockquote
cite="mid:1171531603.94982.1369741798081.JavaMail.tomcat@mgs-aaa01.mail.aol.com"
type="cite">
<div><br>
</div>
<div>My project has geoserver serving layers in EPSG:4326
projection.</div>
</blockquote>
Geoserver might store the layers in 4326, but it will serve them up
in whatever the projection of your current baselayer is. This is
very important to understand. Change the baselayer to one with a
different projection and the projection of the map will change. As a
result, it will fire off requests to geoserver asking for data in
that baselayer projection.<br>
<br>
<blockquote
cite="mid:1171531603.94982.1369741798081.JavaMail.tomcat@mgs-aaa01.mail.aol.com"
type="cite">
<div><br>
</div>
<div>When I create a google layer:</div>
<div><br>
</div>
<div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span>
var gmap = new OpenLayers.Layer.Google("Google
Streets", {numZoomLevels: 20});</div>
<div><br>
</div>
EPSG is 4326,</div>
<div>and units are in degrees.</div>
</blockquote>
<br>
Actually, if you use this, then your baselayer is 900913 and so
your map will be 900913. Using 4326 as the actual "projection"
doesnt make a lot of sense. 4326 is good to set as the maps
displayProjection for mouse pointer but as a "projection" it has no
features that a cartographer could love. 900913 isnt wonderful
either but its far better than 4326. If you are going to google OR
OSM, then your map will be actually be in 900913. They are stored as
image tiles and there is no easy way to reproject these on the fly
to something else. In contrast, geoserver renders your data on the
fly, into the requested image projection. That's easy for vector
data. It can reproject raster on the fly now to but you might not
like the look of it.<br>
<br>
<blockquote
cite="mid:1171531603.94982.1369741798081.JavaMail.tomcat@mgs-aaa01.mail.aol.com"
type="cite">
<div><br>
</div>
<div><span> </span>var osm = new OpenLayers.Layer.OSM("osm",
{projection: new OpenLayers.Projection('EPSG:4326')});</div>
</blockquote>
<br>
When you create a layer, the projection parameter is effectively a
hint, telling openlayers what the NATIVE projection of the layer is.
The map baselayer is what will determine the projection that is
actually requested is. For OSM, this has no effect - you can only
get 900913(3587)<br>
<blockquote
cite="mid:1171531603.94982.1369741798081.JavaMail.tomcat@mgs-aaa01.mail.aol.com"
type="cite">- Why is OSM layer projection EPSG:900913?</blockquote>
Because its a tile layer and cant be reprojected on the fly. (same
as google).<br>
<blockquote
cite="mid:1171531603.94982.1369741798081.JavaMail.tomcat@mgs-aaa01.mail.aol.com"
type="cite">
<div>- Can I have a OSM baseLayer in a different projection?
The {projection: new OpenLayers.Projection('EPSG:4326')}
argument seemed to have no effect on the layer.</div>
</blockquote>
No.<br>
<br>
If you really want a prerendered tile layer as base in something
other than 900913, then you are probably better to create and store
it yourself. That probably means hacking something like Tilemill or
maptiler. However, I am pretty sure that you really dont want 4326
as a projection. My bible is Snyder's "Map Projections - A working
manual".<br>
<div>
<div style="border-top: solid 1px black; border-bottom: solid 1px black;
padding: 10px 0; margin: 20px 0; font-size: 8pt;
font-family: Verdana, Arial, Helvetica, sans-serif;">Notice: This email and any attachments are confidential. If received in error please destroy and immediately notify us. Do not copy or disclose the contents.<br></div>
</div>
</body>
</html>