Hi, If you look at the source of WMS (lib\OpenLayers\Layer\WMS.js), take a look at getFullRequestString. In it, the baselayer's projection will always override the given projection. In fact, the layers projection itself will be ignored: - It takes the Map Projection (=Baselayer projection) - then, if the WMS layer projection equals the map projection, it uses the layer projection - otherwise, it uses the map projection
In other words, it will only use the map projection in it's WMS request URL's So yeah... everything MUST be the same projection for WMS layers or it cannot be placed on top of eachother. For me, this meant reprojecting my own data so I can serve it with WMS onto OSM. You can check these actual outgoing URL's with Firebug and such. regards, Casper Span On Wed, Jan 16, 2013 at 12:31 PM, Sergeant_york <[email protected]>wrote: > Hello there, > > Thank you for the answer. That gave me a good idea. Unfortunately it > doesn't > work when initializing layer. > > On the other hand creating a layer (for example aLayer object) then > changing > projection works! > > Workin way is: > layer aLayer=new OpenLayers.Layer.WMS ...... > aLayer.projection= new OpenLayers.Projection("EPSG:3857") > > > > -- > View this message in context: > http://osgeo-org.1560.n6.nabble.com/epsg-3857-and-google-900913-tp5027619p5027809.html > Sent from the OpenLayers Users mailing list archive at Nabble.com. > _______________________________________________ > Users mailing list > [email protected] > http://lists.osgeo.org/mailman/listinfo/openlayers-users > -- Casper Span T: @Span_Droid <https://twitter.com/#%21/Span_Droid> W: http://www.spatially-oriented.com M: [email protected]
_______________________________________________ Users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/openlayers-users
