[OpenLayers-Users] Problem to load a WFS

Steve.Toutant at inspq.qc.ca Steve.Toutant at inspq.qc.ca
Fri Jun 5 09:22:22 EDT 2009


Hi,
I set a WFS server that I'm pretty sure works correctly since I get a xml 
file when submitting this to the browser (Unfortunatly you don't have 
access to this domain and I don't have any public domain.)
http://geo.inspq.rtss.qc.ca/cgi-bin/mapserv.exe?map=/ms4w/paccSante/map/paccsante2.map&SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&TYPENAME=HLM_shp_wfs2

But I can not load the data from the WFS in open layers or any other 
client such as gaia and gvSig. I can see though a WMS from the same 
mapfile. Here is my openlayers function and below the mapfile.
I don't get any error message and I can't find a log describing the 
problem. 

Thanks for your help,
Steve

/*OpenLayers*/
function init(){
                var options = {
                projection: new OpenLayers.Projection("EPSG:900913"),
                displayProjection: new OpenLayers.Projection("EPSG:4326"), 
//Pour afficher les coord lat long
                units: "m",
                numZoomLevels: 10,
        maxResolution: "auto", 
                maxExtent: new OpenLayers.Bounds(-9239517, 5465442, 
-5565974, 9349764)
            };


            map = new OpenLayers.Map( 'map', options );

                        /*base map*/
                        google = new OpenLayers.Layer.Google( "Google 
Hybrid", { type: G_HYBRID_MAP, 'sphericalMercator': true} );

                        /*Overlays*/
                        monWFS = new OpenLayers.Layer.WFS( 
                                "HLM en wfs", 
"http://geo.inspq.rtss.qc.ca/cgi-bin/mapserv.exe?map=/ms4w/paccSante/map/paccsante.map2&", 

                                {typename: 'HLM_shp_wfs2'}, 
                                { extractAttributes: true}
                        );
            hlm = new OpenLayers.Layer.WMS( "HLM", 
 
"http://geo.inspq.rtss.qc.ca/cgi-bin/mapserv.exe?map=/ms4w/paccSante/map/paccsante2.map&",
                                        {layers: 'HLM_shp', transparent: 
"true", format:"image/gif"},{isBaseLayer: false, visibility: 
false,singleTile:true}
                                        );

 
            map.addLayers([google, hlm, monWFS]);

        map.zoomToMaxExtent();
            map.addControl( new OpenLayers.Control.LayerSwitcher() );
        map.addControl( new OpenLayers.Control.MousePosition() );

        }

/*map file*/



MAP
  NAME paccsante2
  UNITS kilometers
  SHAPEPATH     '\ms4w\paccSante\data\'
  EXTENT -9239517 5465442 -5565974 9349764

  DEBUG 5 
  CONFIG MS_ERRORFILE "/ms4w/logs/mapserver.log"

  RESOLUTION 72
  PROJECTION
    "init=epsg:900913" #si overlay avec google
  END

  IMAGETYPE gif


OUTPUTFORMAT
  NAME gif
  DRIVER "GD/GIF"
  MIMETYPE "image/gif"
  IMAGEMODE PC256
  EXTENSION "gif"
  TRANSPARENT ON

END

  WEB
 IMAGEPATH "D:\ms4w\tmp\ms_tmp\"
    IMAGEURL  "/ms_tmp/"
 
    # WMS WFS server settings
    METADATA
      'wms_title'           'PACC Santé'
      'wms_onlineresource' 
'http://geo.inspq.rtss.qc.ca/cgi-bin/mapserv.exe?map=/ms4w/paccSante/map/paccsante.map&'
      'wms_srs'             'EPSG:4326 EPSG:32198 EPSG:900913'
        'wms_feature_info_mime_type' "text/html" 

        'wfs_title' 'wfs_paccsante'
        'wfs_onlineresource' 
'http://geo.inspq.rtss.qc.ca/cgi-bin/mapserv.exe?map=/ms4w/paccSante/map/paccsante.map2&'
        'wfs_srs' 'EPSG:900913'
    END

  END #web

LAYER
    NAME 'HLM_shp'
    TYPE POINT
    DATA 'hlm/hlm_omh'
    DUMP true
    METADATA
      'wms_title' 'HLM_shp'
        'wms_srs'             'EPSG:4326 EPSG:32198 EPSG:900913'
    END

    STATUS off
    OPACITY 100
  PROJECTION
    "init=epsg:4326"
  END

  CLASS 
    STYLE
      COLOR 0 0 255
      SYMBOL 'CIRCLE'
      SIZE 8
    END
  END #class
END

LAYER
    NAME 'HLM_shp_wfs2'
    TYPE POINT
    DATA 'hlm/hlm_omh'
    DUMP true
        STATUS ON
    METADATA
        'wfs_title' 'HLM en wfs'
        'gml_featureid' 'IDBATIMENT'
        'gml_include_items' 'all'
    END
 
  PROJECTION
    "init=epsg:4326"
  END

  CLASS
        NAME "hlm_wfs" 
    STYLE
      COLOR 0 0 255
      SYMBOL 'CIRCLE'
      SIZE 8
    END
TEMPLATE "../template/wfs_hlm.html"
  END #class
END



      #Circle symbol
      SYMBOL
        NAME 'CIRCLE'
        TYPE ellipse
        FILLED true
        POINTS
          1 1
        END
      END 

END #map

Steve Toutant, M. Sc.
Analyste en géomatique
Secteur environnement
Direction des risques biologiques, environnementaux et occupationnels
Institut national de santé publique du Québec
945, avenue Wolfe
Québec, Qc G1V 5B3 
Tél.: (418) 650-5115 #5281
Fax.: (418) 654-3144
steve.toutant at inspq.qc.ca
http://www.inspq.qc.ca
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090605/e7536ac4/attachment.html


More information about the Users mailing list