[OpenLayers-Users] Layer.Vector with Protocol.WFS will not show

François Boussuges f.boussuges at gmail.com
Wed May 26 08:47:53 EDT 2010


Hello, try this, I have the same problem with my layers and this method 
work fine:

var protocol1=new OpenLayers.Protocol.HTTP(
            {url : "http://localhost:8090/geoserver/wfs?",
                params: {format:"WFS",
                service: "WFS",
                version: "1.0.0",
                request: "GetFeature",
                typename: "MEDICAGO_VIEW",
                SRS: "EPSG:4326"},
                format : new OpenLayers.Format.GML()

scalable vector a écrit :
> I've tried your suggestion with OL 2.9 now, but there is no change. Any idea why?
>
> My wfs-server can deliver GML 2.1.2, GML 3.0, GML 3.1.1 and GML 3.2. What does OL need?
>
>
> --- On Thu, 3/11/10, Bart van den Eijnden <bartvde at osgis.nl> wrote:
>
>   
>> From: Bart van den Eijnden <bartvde at osgis.nl>
>> Subject: Re: [OpenLayers-Users] Layer.Vector with Protocol.WFS will not show
>> To: "Bart van den Eijnden" <bartvde at osgis.nl>
>> Cc: "scalable vector" <scalablev at yahoo.com>, users at openlayers.org
>> Date: Thursday, March 11, 2010, 12:06 PM
>> Btw, readFormat was not in OL 2.8,
>> only in trunk.
>>
>> Best regards,
>> Bart
>>
>> On Mar 11, 2010, at 11:57 AM, Bart van den Eijnden wrote:
>>
>>     
>>> Hi,
>>>
>>> this is because the new GML parser (i.e. Format.GML.v2
>>>       
>> in your case) does not parse your response. I would need to
>> dig in deeper to see why.
>>     
>>> As a workaround, you can specify the old GML parser
>>>       
>> (used by Layer.WFS) as the readFormat for your Protocol.WFS,
>> so:
>>     
>>> protocol: new OpenLayers.Protocol.WFS({
>>>      url: 
>>>       
>> "/grensepunkt.gml.asp",
>>     
>>>      readFormat: new
>>>       
>> OpenLayers.Format.GML(),         
>>                
>>                
>>                 
>>     
>>>      featureType: "GRENSEPUNKT"
>>>   ..
>>> etc.
>>>
>>> Best regards,
>>> Bart
>>>
>>> On Mar 11, 2010, at 11:41 AM, scalable vector wrote:
>>>
>>>       
>>>> http://kart.nois.no/openlayers-2.8test/test.htm tries
>>>>         
>> to display some gml with Layer.WFS (deprecated according to
>> the docs) and Layer.Vector. Only Layer.WFS works. Can anyone
>> see why? I tried setting featurePrefix and featureNS, but
>> that didn't help.
>>     
>>>>
>>>> _______________________________________________
>>>> 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
>>>
>>>       
>>     
>
>
>       
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
>
>   




More information about the Users mailing list