[Gfoss] wms mapserver e openlayer

Francesco Geri francescogeri a yahoo.it
Gio 4 Nov 2010 16:19:56 CET


Salve a tutti.
Sto cercando di visualizzare dati postgis attraverso mapserver con 
openlayer. Ho provato realizzando un server WFS ma ho avuto una serie di 
problemi. Sono passato allora ad un server WMS. L'overlay di un layer 
postgis su un base layer OSM è filata via abbastanza liscia. Ovviamente 
mi sono bloccato subito dopo sull'interrogazione del layer. Infatti il 
getfeatureinfo mi restituisce una serie di errori. Ho utilizzato una 
funzione che ho trovato in rete e che posto qui di seguito

map.events.register('click', map, function (e) {
     var url 
="http://localhost/cgi-bin/mapserv?map=/var/www/pmapper-4.0/config/florawms/pmapper_florawms.map";
       + "?REQUEST=GetFeatureInfo"
       + "&EXCEPTIONS=application/vnd.ogc.se_xml"
       + "&BBOX=" + map.getExtent().toBBOX()
       + "&X=" + e.xy.x
       + "&Y=" + e.xy.y
       + "&INFO_FORMAT=text/plain"
       + "&QUERY_LAYERS=bioitaly_v"
       + "&LAYERS=bioitaly_v"
       + "&FEATURE_COUNT=1"
       + "&SRS=EPSG:900913"
       + "&STYLES="
       + "&WIDTH=" + map.size.w
       + "&HEIGHT=" + map.size.h;
     
window.open(url,"GetFeatureInfo","location=0,status=1,scrollbars=1,width=600,height=150");
   });

Quando vado a cliccare su un elemento mi si apre la nuova finestra ma mi 
restituisce un errore

mapserv(): Web application error. Traditional BROWSE mode requires a 
TEMPLATE in the WEB section, but none was provided.

Se faccio una GetFeature request, questo è quello che ottengo

<?xml version='1.0' encoding="UTF-8" standalone="no" ?>
<!DOCTYPE ServiceExceptionReport SYSTEM "http://schemas.opengis.net/wms/1.1.1/exception_1_1_1.dtd">
<ServiceExceptionReport version="1.1.1">
<ServiceException code="LayerNotQueryable">
msWMSFeatureInfo(): WMS server error. Requested layer(s) are not queryable.
</ServiceException>
</ServiceExceptionReport>


Immagino quindi che ci sia qualcosa di sbagliato nel .map ma non riesco 
a capire cosa. Oltre a non aver evidentemente configurato un template 
web, ma come sarebbe questo template? Una oagina html qualsiasi? I proxy 
mi sembra di averlo settato (OpenLayers.ProxyHost = 
"/cgi-bin/proxy.cgi?url=";). Dove sto sbagliando?


Maggiori informazioni sulla lista Gfoss