Hi Roald,

Adding propertyNames (attributes of the feature) to the protocol solves the
problem with the geometry for MapServer 5.6.1. First I thought it wouldn't
work, because i added msgeometry instead of msGeometry. And I have to add
srsName to the protocol, what for version 5.2 is not needed.

thx
Arnd 

-----Ursprüngliche Nachricht-----
Von: Roald de Wit [mailto:[email protected]] 
Gesendet: Samstag, 29. Mai 2010 07:25
An: 'Blake Crosby'
Cc: Arnd Wippermann; [email protected]
Betreff: Re: [OpenLayers-Users] WFS Not Returning Coordinates

Hi Blake,

You can work around this issue by providing the property names explicitly in
the options of your protocol, including the name of the geometry.
Example:

     propertyNames: 
'year,seq,name,storm_start,storm_end,msGeometry'.split(',')

Note that MapServer by default chooses 'msGeometry' as the name of the
geometry attribute even though it might be called 'the_geom' or
'wkb_geometry' on the data source. In your case it's 'location' I presume.

Regards, Roald


On 28/05/10 03:26, Arnd Wippermann wrote:
> Hi,
>
> If you use Mapserver 5.6.x, then it's a bug.
>
> WFS Server - GetFeature POST request does not return geometry
> http://trac.osgeo.org/mapserver/ticket/3235
>
> Arnd
>
> -----Ursprüngliche Nachricht-----
> Von: [email protected] 
> [mailto:[email protected]] Im Auftrag von Blake Crosby
> Gesendet: Donnerstag, 27. Mai 2010 16:36
> An: [email protected]
> Betreff: [OpenLayers-Users] WFS Not Returning Coordinates
>
> Hello,
>
> I'm using WFS Protocol on a vector layer (as per the example) to plot 
> data on the map from a wfs server:
>
>       var geographic = new OpenLayers.Projection("EPSG:4326");
>                var layer = new OpenLayers.Layer.Vector("WFS", {
>                   strategies: [new OpenLayers.Strategy.BBOX()],
>                   protocol: new OpenLayers.Protocol.WFS({
>                   url:  "http://mapserver.worldflightplanner.com/radar/";,
>                   featureType: "flightrules",
>               featureNS: "http://mapserver.gis.umn.edu/mapserver";,    
>               featurePrefix: "ms",
>               version: "1.1.0",
>               geometryName: "location",
>               srsName: "EPSG:4326",
>               extractAttribute: true
>               }),projection: geographic
>              });
>
> This works fine, however, the returned GML from the WFS does not 
> contain any coordinates, just the metadata. Is this something wrong 
> with my Mapserver configuration, or my OL call?
>
> You can see the request, and the returned data here:
>
> http://pastebin.org/284683
>
> Thanks,
> Blake
> _______________________________________________
> Users mailing list
> [email protected]
> http://openlayers.org/mailman/listinfo/users
>
> _______________________________________________
> Users mailing list
> [email protected]
> http://openlayers.org/mailman/listinfo/users
>    

_______________________________________________
Users mailing list
[email protected]
http://openlayers.org/mailman/listinfo/users

Reply via email to