Hi Erik, You're nearly there! You need to set a maxResolution option, say:
maxResolution: 156543.0339, for example. I don't know why that is (can somebody please explain?). You also need to change you projection to a projection object instead of a string (although in your example you can get away with it). See [1] for more information. Regards, Roald [1] http://trac.openlayers.org/wiki/SphericalMercator Erik Heinz wrote: > Hi, > > could anyone please point me to a working example of a transparent > WMS layer as overlay over a Google Maps layer in EPSG:900913 projection? > > My current attempt looks like this: > > var options = { > projection: "EPSG:900913", > units: 'm', > maxExtent: new OpenLayers.Bounds( > 1272516.0, 6585124.3, 1319786.0, 6632981.0), > controls: [new OpenLayers.Control.MouseDefaults()] > }; > map = new OpenLayers.Map('map', options); > > l_gsat = new OpenLayers.Layer.Google('Google', > {type: G_SATELLITE_MAP, 'sphericalMercator': true} ); > > l_rr = new OpenLayers.Layer.WMS('Radrouten', > 'http://wms.adfc-jena.de/rrtop.php?show=all', > {layers:'Radrouten', format:'img/png', transparent:'true'}, > {'reproject': false, 'isBaseLayer': false} > ); > > map.addLayers([l_gsat,l_rr]); > > Complete example is at: http://www.adfc-jena.de/karte/radrouten1.php > The Google layer is being displayed but the WMS server never gets queried. > I played around changing parameters but without avail. > > (The WMS server is not a complete implementation but does only simple GetMap > queries. It works fine as a single layer in OpenLayers though.) > > What I'm doing wrong here? Any help is greatly appreciated. > I am using OpenLayers-2.5 for now. > > Thank you in advance, > Erik > _______________________________________________ > Users mailing list > [email protected] > http://openlayers.org/mailman/listinfo/users > > _______________________________________________ Users mailing list [email protected] http://openlayers.org/mailman/listinfo/users
