[OpenLayers-Users] Possible bug with Protocol.WFS

Eric Lemoine eric.lemoine at camptocamp.com
Tue Feb 9 12:07:23 EST 2010


On Tuesday, February 9, 2010, Tim Schaub <tschaub at opengeo.org> wrote:
> Tim Schaub wrote:
>> Andreas Hocevar wrote:
>>> Hi,
>>>
>>> Brian Stempin wrote:
>>>> I've been working with a few people on #openlayers to help me out with
>>>> a WFS issue.  I'm posting this to the list because I may have found a
>>>> bug in the process.
>>>>
>>>>
>>>>                     protocol:new OpenLayers.Protocol.WFS({
>>>>                         version: "1.1.0",
>>>>                         //url: "test.xml",
>>>>                         // modified by bstempi
>>>>                         url: "/geoserver/wms",
>>>>                         featureType: "v_stats_20090101_000000",
>>>>                         featureNS: "http://192.168.0.20/geoserver/wms",
>>>>                         geometryName: "the_geom"
>>>>                     })
>>>>                 });
>>>>
>>>>
>>>> I found that the above code will work if you add srsName:
>>>> "EPSG:900913" to the WFS options.
>>>>
>>>> Is this a feature/bug/magic, or me being silly?
>>> You mean it works if you add that to the protocol options, right? That's
>>> the way it is done. The BBOX strategy will use map coordinates
>>> (EPSG:900913), and the protocol would think they are in the default SRS
>>> for the feature type if you don't tell it what the SRS is.
>>>
>>
>> Right.  Sorry I stopped short of making it work for your WFS (as an
>> aside, though GeoServer is lenient with your /geoserver/wms url above,
>> it might be less misleading to use /geoserver/ows or /geoserver/wfs - no
>> real difference if you are sending the SERVICE parameter, but it is less
>> confusing to the reader).
>>
>> One way you could have determined what was wrong was to examine the
>> outgoing GetFeature request.  In Firebug, you should see the POST
>> request being issued.  Looking at the body of the request, I imagine
>> you'll see an element representing the bounding box with an srsName
>> attribute of "EPSG:4326".  It is a shortcoming of the protocol that it
>> doesn't try to guess the srsName from the layer projection.  I'll ticket
>> this.
>
> Scratch that.  The protocol doesn't know about the layer.  Hmmmm.

The strategy does, so it could pass the srsName to the protocol. Just
an idea... I'm not sure this is relevant.

-- 
Eric Lemoine

Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex

Tel : 00 33 4 79 44 44 96
Mail : eric.lemoine at camptocamp.com
http://www.camptocamp.com



More information about the Users mailing list