[OpenLayers-Users] WMS in OpenLayers: Objects get Cut

Pfirter Lukas lp at rpag.ch
Wed Jul 18 05:05:35 EDT 2007


Hi Benoit, thanks for your quick answer!
Unfortunately, putting the WMS layer above the Google-Layers in the code (http://map.webser125.lookass.ch/openlayers/ex_rpag_google_test.php) doesn't change anything, WMS still hides partially.
I've seen that I just have to move the map a slightly little bit after changing the zoom to make everything visible like should be... Isn't there like a function that will move the map 1 px everytime you change zoom? Or another workaround for this? Is it a bug actually?



-----Ursprüngliche Nachricht-----
Von: Benoit Myard [mailto:myardbenoit at gmail.com] 
Gesendet: Mittwoch, 18. Juli 2007 10:05
An: Pfirter Lukas
Cc: Users at openlayers.org
Betreff: Re: [OpenLayers-Users] WMS in OpenLayers: Objects get Cut

Now I understand.

Well, it looks like some Google tiles appear upon -- and hide -- your WMS Layer. As far as I can tell, you add your WMS layer before your Google layer to the map. As often in IT, it may be a good starting point to fix that, "just to make sure".

So please, use this piece of code in your page :

var satellite = new OpenLayers.Layer.Google( "Google Satellit" ,
{type: G_SATELLITE_MAP, 'maxZoomLevel':19} ); var karte = new OpenLayers.Layer.Google( "Google Karte" , {type:
G_NORMAL_MAP, 'maxZoomLevel':19} );
var hybrid = new OpenLayers.Layer.Google( "Google Hybrid" , {type:
G_HYBRID_MAP, 'maxZoomLevel':19} );
map.addLayers([satellite, karte, hybrid]);

var layer = new OpenLayers.Layer.WMS.Untiled( "RPAG", "http://map.webser125.lookass.ch/cgi-bin/mapserv?map=/home/web/web4/data_rpaglocation/rpag_lp_test.map",
{layers:'anfahrtsweg,oeffentlicher_verkehr', transparent:true, format:'image/png'} ); map.addLayer(layer);

Now please, let us know if the problem is still there.

--
Benoit Myard



More information about the Users mailing list