Setting (without trasparency and format)

overview_map2 = new OpenLayers.Layer.WMS('Province', "http://"+ wms_hostname 
+"/cgi-bin/mapserv?map=" + mapfile_path, {'layers': "Province"});


The OverView Control works but the layer inside of it isn't rendered because of 
this:

Resource interpreted as Image but transferred with MIME type 
application/vnd.ogc.se_xml


Message contained inside MapServer response is:

WMS server error. Invalid SRS given : SRS must be valid for all requested 
layers.

As I can see usinf debug Openlayers made this GET request

http://myhostname/cgi-bin/mapserv?map=/MapServer/mapfile_calabria_strati.map&LAYERS=Province&SRS=EPSG%3A4326&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&FORMAT=image%2Fjpeg&BBOX=-20,38,12,70&WIDTH=256&HEIGHT=256


Through this I can see that the requested srs is EPSG:4326 instead of map 
projection that is 32633.

So, i solved with this


<code>

        var opzioni_overview = {
            maxExtent: extend_bounds, 
            maxResolution: 'auto',
            projection: "EPSG:32633"
        };    
    
    overview_map2 = new OpenLayers.Layer.WMS('Province', "http://"+ 
wms_hostname +"/cgi-bin/mapserv?map=" + mapfile_path, {'layers': "Province"});
    
    overviewmap_clone = overview_map2.clone();
    
    
    overview1 = new OpenLayers.Control.OverviewMap({
            maximized : true, layers: [overviewmap_clone],
            mapOptions: opzioni_overview, 
        });
    
    map.addControl(overview1);


</code>

thank you openlayers :)
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users

Reply via email to