I'm new to OpenLayers and GeoServer and I have a problem (of course :P). I must retrieve a layer from a GeoServer WMS service, and I want to construct the URL to request it. If I try to make this:
map.addLayer(new OpenLayers.Layer.WMS("test",
"http://192.168.0.30:8080/geoserver/dsn/wms?service=WMS&version=1.1.1&request=GetMap&BBOX="+map.getExtent().toBBOX()+"&srs=EPSG:900913",
{ layers: "area", transparent: true, format: 'image/png' })
);
all the tiles of the grid of the WMS are the same (I see a sort of periodic repetition of the image) but if I do
map.addLayer(new OpenLayers.Layer.WMS("test",
"http://192.168.0.30:8080/geoserver/dsn/wms?service=WMS&version=1.1.1&request=GetMap",
{ bbox:map.getExtent().toBBOX(), srs:"EPSG:900913", layers: "area", transparent: true, format: 'image/png' })
);
everything is working as expected.
What am I doing wrong in constructing the URL?