[OpenLayers-Users] How to insert that I digitized Feture in my WFS layer?

Alexandre Dube adube at mapgears.com
Wed Nov 19 09:35:07 EST 2008


Well, I don't know any other way if there are.  Maybe someone else could 
help you for that matter.

But, you should take some time to read the whole example and try it.  
You would discover a not so hard way to use WFS-Transactions.

Cheers,

Alexandre

ironbar wrote:
> Thanks for the answer: I saw the wfs transaction example that you mentioned
> but still I can not figure out the connection between a created feature and
> a wfs layer in which I want to insert my feature. I simply would like to see
> what is the simplest code for inserting a feature to a wfs layer. That is
> why I posted the snippet that I thought is the simplest way for implementing
> a wfs transaction.
> I hope that there is a simpler way to perform wfs transactions than as it is
> given in mentioned example.
>
> Alexandre Dube wrote:
>   
>> Hi,
>>
>>   Check out the WFS-T example in this sandbox to see a way of doing it 
>> with the WFS protocol : 
>> http://svn.openlayers.org/sandbox/topp/wfs/examples/wfs-protocol-transactions.html
>>
>>   Download this svn version and try it.  Hope this helps.
>>
>> Best regards,
>>
>> Alexandre
>>
>>
>> ironbar wrote:
>>     
>>> Dear all,
>>> Here is a snippet of my code:
>>>
>>>
>>> var wfsl= new OpenLayers.Layer.WFS( "MY WFS",
>>> 			                    "http://localhost/geoserver/wfs?",
>>> 			                    {typename: 'topp:mywfs'},
>>>                                                        { typename:
>>> 'topp:mywfs'  });
>>>
>>>           
>>> var wff= new OpenLayers.Format.WFS({layerName:'topp:mywfs'},wfsl);
>>> 				
>>> feature.state = OpenLayers.State.INSERT;
>>>
>>> wff.insert(feature);
>>>
>>> I simply want to insert the feature in my wfs layer but what I get is
>>> "An attempt was made to create or change an object in a way which is
>>> incorrect with regard to namespaces" code: 14"
>>> I would like simply to find a way how to perform wfs transactions using
>>> an
>>> imported wfs layer and feature that I created using openlayers example
>>> "vector-formats".
>>> Thank you 
>>>
>>>   
>>>       
>> -- 
>> Alexandre Dubé
>> Mapgears
>> www.mapgears.com
>>
>> _______________________________________________
>> Users mailing list
>> Users at openlayers.org
>> http://openlayers.org/mailman/listinfo/users
>>
>>
>>     
>
>   


-- 
Alexandre Dubé
Mapgears
www.mapgears.com




More information about the Users mailing list