[OpenLayers-Users] Request with wrong column name
Luís de Sousa
luis.a.de.sousa at gmail.com
Wed Jan 27 10:46:19 EST 2010
Hello Gabriel,
Thank you for your reply. I add the geometryName property to the WFS
constructor; it now is:
wfs = new OpenLayers.Layer.WFS(
"Tanques",
"/geoserver/wms",
{typename: 'insaar:M_TANQUE',
srs: 'EPSG:82176'
},
{
typename: "M_TANQUE",
featureNS: "http://insaar.inag.pt",
geometryName: "shape",
commitReport: function() {
},
extractAttributes: true,
}
);
This had no effect, in the request the feature is still identified with
"the_geom". I could change the column name in the database, but would prefer
some workaround with the code.
Thanks,
Luís
On Tue, Jan 26, 2010 at 10:12 PM, Gabriel Nolasco <
nolasco_gabriel at yahoo.com.br> wrote:
> Hello Luis,
>
> If you are using a vector layer with a WFS protocol you can use the
> property 'geometryName' to set the name of the geometry column. Default is
> 'the_geom'[1]
> You can see an example of the WFS protocol usage at OpenLayers examples
> page [2]
>
> [1]
> http://dev.openlayers.org/docs/files/OpenLayers/Protocol/WFS/v1-js.html#OpenLayers.Protocol.WFS.v1.geometryName
> [2] http://openlayers.org/dev/examples/wfs-protocol-transactions.html
>
> Best regards,
> Gabriel Nolasco
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100127/3b70fa52/attachment.html
More information about the Users
mailing list