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

ironbar joki_frei at yahoo.com
Wed Nov 19 09:20:40 EST 2008


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
> 
> 

-- 
View this message in context: http://n2.nabble.com/How-to-insert-that-I-digitized-Feture-in-my-WFS-layer--tp1518519p1519219.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.




More information about the Users mailing list