Hi,

Here's my map file :

MAP
        NAME "Mapserver"
        FONTSET "./fonts/fonts.txt"
        OUTPUTFORMAT
                NAME "png"
                DRIVER "AGG/PNG"
                MIMETYPE "image/png"
                IMAGEMODE RGB
        END #fin format

        EXTENT 679286.0 6153539.5 679580.0 6153724.6 #xmin ymin xmax ymax
        UNITS METERS
        DEBUG 5
        CONFIG "CPL_DEBUG" "ON"
        CONFIG "PROJ_DEBUG" "ON"
        CONFIG MS_ERRORFILE "C:/ms4w/errorMapFile.txt"

        PROJECTION # proj de sortie
                "init=epsg:2154"
        END
        
        WEB     
                METADATA
                        "wms_title" "WMS, aide au montage des opérations"
                        "wms_onlineresource"
"http://127.0.0.1:8080/cgi-bin/mapserv.exe?MAP=C:/ms4w/map/prescr_test.map";
                        "wms_enable_request" "*" #active les getcapabilities, 
getmap,
getfeatureinfo, getfeature
                        "wms_srs" "EPSG:2154 EPSG:3857 EPSG:900913"
                        "wms_encoding" "UTF-8"
                END #fin metadata
        END #end web

        LAYER
        NAME "prescriptions"
        #STATUS ON
        TYPE POLYGON
        PROJECTION
                "init=epsg:2154"
        END #fin projection
        CONNECTIONTYPE POSTGIS
        CONNECTION "host=10.210.1.32 dbname=activite user=PostGIS
password=CAVIAR2016 port=5432"
        DATA "geom from (select gid, geom, numope, numprescr, annee, nomope, ro,
typope from activite.prescription) as foo using unique gid SRID=2154"
        PROCESSING "CLOSE_CONNECTION=DEFER"
        MAXSCALEDENOM 80000
        LABELITEM "numprescr"
        CLASS
                NAME "prescriptions"
                STYLE
                        COLOR 200 125 0
                        OPACITY 50
                        OUTLINECOLOR 200 125 0
                        WIDTH 1
                        LINECAP round
                END #end Style
                LABEL
                        FONT "verdana"
                        SIZE 4
                        COLOR 0 0 0
                        OUTLINECOLOR 255 255 255
                        OUTLINEWIDTH 1
                        POSITION auto #uc
                        MAXSCALEDENOM 80000
                        TYPE truetype
                END #fin label
        TEMPLATE "bidon.html"   
        END #fin class
        METADATA
                "gml_include_items" "all"
                "wms_title" "prescriptions"
                #"wms_srs" "EPSG:2154"
        END #fin metadata prescriptions
END #fin layer prescriptions

END

I have a correct image in Firefox. But in QGIS I can't get anything, it says
: 

<ServiceException code="LayerNotDefined">
                        msWMSLoadGetMapParams(): WMS server error. Invalid 
layer(s) given in the
LAYERS parameter. A layer might be disabled for this request. Check
wms/ows_enable_request settings.

Layer name is right. 
Besides this layer is just a copy of another one working perfectly, with the
request available ! So I can't figure out the reason why I can't display
this layer.
Any idea ?



--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/wms-ows-enabe-request-and-invalid-layer-and-Qgis-tp5302807.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
_______________________________________________
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Reply via email to