[OpenLayers-Dev] WFS-T and fid property

Denis Rykov rykovd at gmail.com
Mon Feb 14 12:46:35 EST 2011


I've tried debugging with firebug and discover that in onCommit method command

var insertIds = response.insertIds || [];

always returns array with length=1, which contains fid of inserted
feature. At least in my case.

On Mon, Feb 14, 2011 at 10:26 PM, Alexandre Dube <adube at mapgears.com> wrote:
> Hi,
>
>  Using Firebug, put a break point in the onCommit method of the Save
> strategy to see what's going on.  That could give you a hint.  Also, have
> you tried with different versions of OpenLayers (2.10, trunk) ?
>
> Best regards,
>
> Alexandre
>
>
> On 11-02-14 11:18 AM, Denis Rykov wrote:
>>
>> Hi!
>> I'm not sure this right place for my message, but Ive discovered the
>> following problem.
>> I'm using Openlayers and WFS-T Server - TinyOWS. When I add new
>> features to layer and commit changes - I get answer from TinyOWS, for
>> example:
>>
>>
>> <?xml version='1.0' encoding='utf-8'?>
>> <wfs:WFS_TransactionResponse version="1.0.0"
>>  xmlns:wfs="http://www.opengis.net/wfs"
>>  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>  xmlns:ogc="http://www.opengis.net/ogc"
>>  xsi:schemaLocation='http://www.opengis.net/wfs
>> http://schemas.opengis.net/wfs/1.0.0/WFS-transaction.xsd'>
>> <wfs:InsertResult handle="TinyOWS-WFS-default-handle"><ogc:FeatureId
>> fid="views.157"/><ogc:FeatureId fid="views.158"/><ogc:FeatureId
>> fid="views.159"/></wfs:InsertResult>
>> <wfs:TransactionResult>
>> <wfs:Status><wfs:SUCCESS/></wfs:Status>
>> </wfs:TransactionResult>
>> </wfs:WFS_TransactionResponse>
>>
>> But only one (the first) of newly created feature of layer in
>> OpenLayers contains fid property, another feature have fid value =
>> null. Is this problem of OpenLayer or TinyOWS. Could anyone confirm
>> described behavior? Now I'm using refresh() method of layer, but I
>> guess this is not best way.
>> _______________________________________________
>> Dev mailing list
>> Dev at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/openlayers-dev
>
>
> --
> Alexandre Dubé
> Mapgears
> www.mapgears.com
>
> _______________________________________________
> Dev mailing list
> Dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/openlayers-dev
>


More information about the Dev mailing list