Thank you for your answer. If I understand, the BBOX strategy option will do the stuff with the limits to take into account for not reading the whole data. I have some other questions :
- I am not sure which URL to put for "featureNS"? - I also had a problem of GML format : I used the option OUTPUTFORMAT=GML2 in the URL request, because I could not make OpenLayers read GML3 (it's probably possible but I don't know how). How can I put this option in the code of the layer ? If it's not possible, how can I read the GML3 Mapserver is generating with OpenLayers ? Best regards, Arthur bart...@osgis.nl a écrit : > Hi, > > please check examples\wfs-protocol.html for the right way to do this as of > OpenLayers 2.8. > > Best regards, > Bart > > >> Hello, >> >> I am trying to display part of the data of a big shapefile with a WFS >> request and BBOX to filter the data and display only the vectors >> contained in the map view. >> >> I just finished configuring the WFS server (Mapserver) : URL request is >> working and I could read the XML that I saved in a file with OpenLayers >> (for testing). Now I try to make the WFS request with OpenLayers and I >> don't understand what is the problem. I tried two solutions based on >> what I found on the net. Here is my OpenLayers code : >> >> >> var map, wms, test_WFS; >> function init() >> { >> map = new OpenLayers.Map('map', { >> controls: [new OpenLayers.Control.Navigation(), >> new OpenLayers.Control.PanZoom(), >> new OpenLayers.Control.LayerSwitcher() >> ] >> }); >> >> wms = new OpenLayers.Layer.WMS("OpenLayers WMS", >> "http://labs.metacarta.com/wms/vmap0", >> {layers:'basic' >> }); >> >> // test_WFS = new OpenLayers.Layer.WFS("test WFS", >> // >> "http://IP-address/cgi-bin/mapserv_5.4.1?map=/var/www/html/WFS_server/test.map&", >> // {service:'WFS', version:'1.1.0', request:'GetFeature', >> bbox:'70,35,75,37', typeName:'aster_gdem', outputFormat:'GML2'}, >> // {} >> // ); >> >> test_WFS = new OpenLayers.Layer.GML("test WFS", [ >> "http://IP-address/cgi-bin/mapserv_5.4.1", >> "?map=/var/www/html/WFS_server/test.map", >> "&SERVICE=WFS", >> "&VERSION=1.1.0", >> "&REQUEST=GetFeature", >> "&BBOX=70,35,75,37", >> "&TYPENAME=aster_gdem", >> "&OUTPUTFORMAT=GML2"].join(",") >> ); >> >> map.addLayers([wms, test_WFS]); >> >> map.zoomToMaxExtent(); >> } >> >> >> The test_WFS layer is not displaying and I don't know how to fix it. >> >> Thank you for your help ! >> >> Arthur Delorme >> >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> >> > > > > _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users