<div dir="ltr"><div><div><div><div><div><div>Hi,<br><br></div>If you look at the source of WMS (lib\OpenLayers\Layer\WMS.js), take a look at getFullRequestString.<br></div>In it, the baselayer's projection will always override the given projection. In fact, the layers projection itself will be ignored:<br>
</div>- It takes the Map Projection (=Baselayer projection)<br></div>- then, if the WMS layer projection equals the map projection, it uses the layer projection<br></div>- otherwise, it uses the map projection<br><br></div>
In other words, it will only use the map projection in it's WMS request URL's<br><div><div><div><div><br>So yeah... everything MUST be the same projection for WMS layers or it cannot be placed on top of eachother.<br>
<div class="gmail_extra"></div><div class="gmail_extra">For me, this meant reprojecting my own data so I can serve it with WMS onto OSM.<br><br></div><div class="gmail_extra">You can check these actual outgoing URL's with Firebug and such.<br>
<br></div><div class="gmail_extra">regards,<br></div><div class="gmail_extra">Casper Span<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jan 16, 2013 at 12:31 PM, Sergeant_york <span dir="ltr"><<a href="mailto:electronicpanda@gmail.com" target="_blank">electronicpanda@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello there,<br>
<br>
Thank you for the answer. That gave me a good idea. Unfortunately it doesn't<br>
work when initializing layer.<br>
<br>
On the other hand creating a layer (for example aLayer object) then changing<br>
projection works!<br>
<br>
Workin way is:<br>
layer aLayer=new OpenLayers.Layer.WMS ......<br>
aLayer.projection= new OpenLayers.Projection("EPSG:3857")<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://osgeo-org.1560.n6.nabble.com/epsg-3857-and-google-900913-tp5027619p5027809.html" target="_blank">http://osgeo-org.1560.n6.nabble.com/epsg-3857-and-google-900913-tp5027619p5027809.html</a><br>

<div class="HOEnZb"><div class="h5">Sent from the OpenLayers Users mailing list archive at Nabble.com.<br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.osgeo.org">Users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/openlayers-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/openlayers-users</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br><br>Casper Span<br>T: <a href="https://twitter.com/#%21/Span_Droid" target="_blank">@Span_Droid</a><br>W: <a href="http://www.spatially-oriented.com" target="_blank">http://www.spatially-oriented.com</a><br>
M: <a href="mailto:info@spatially-oriented.com" target="_blank">info@spatially-oriented.com</a><br><br>
</div></div></div></div></div></div>