[OpenLayers-Users] Problem to load a WFS

Julien-Samuel Lacroix jlacroix at mapgears.com
Mon Jun 8 10:05:42 EDT 2009


Hi,

If you use the FireBug Console, do you see any call to your WFS Server?

Julien

Steve.Toutant at inspq.qc.ca wrote:
> 
> Thanks Maxime,
> Of course it was a part of the problem in openlayers. I fixed that but 
> it still doesn't load in OL, gvSig and gaia
> 
> My guess is it is a permission issue. Any suggestions on some tests I 
> could do or maybe there is a log I can create?
> 
> Steve
> 
> /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_ <mailto:steve.toutant at inspq.qc.ca>_
> __http://www.inspq.qc.ca_ <http://www.inspq.qc.ca/>
> 
>  
> 
> 
> 
> 
> *Maxime Phaneuf <maxime.phaneuf at usherbrooke.ca>@openlayers.org*
> Envoyé par : users-bounces at openlayers.org
> 
> 05/06/2009 09:46 AM
> 
> 	
> A
> 	users at openlayers.org
> cc
> 	
> Objet
> 	Re: [OpenLayers-Users] Problem to load a WFS
> 
> 
> 	
> 
> 
> 
> 
> 
> 
> 
> 
> Hi Steve
> 
> Your mapfile name is paccsante2.map, but in your WFS constructor you're
> calling paccsante.map2.
> 
> As far as I can see, that must be your problem.
> 
> Maxime
> 
> 
> Steve.Toutant wrote:
>  >
>  > 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
>  >  
>  >
>  > _______________________________________________
>  > Users mailing list
>  > Users at openlayers.org
>  > http://openlayers.org/mailman/listinfo/users
>  >
>  >
> 
> -- 
> View this message in context: 
> http://n2.nabble.com/Editing-Layers-tp3028763p3030379.html
> Sent from the OpenLayers Users mailing list archive at Nabble.com.
> 
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
> 
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users

-- 
Julien-Samuel Lacroix
Mapgears
http://www.mapgears.com/



More information about the Users mailing list