On Wed, Nov 19, 2008 at 01:58:21AM -0800, 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"

It's not clear what you mean when you say you want to insert the feature
-- do you want to save the current state of the layer to the server? or
do you want to add a feature to your local layer?

Once you've added a feature to your local layer (via.addFeatures([])),
you can call layer.commit(), which will save t the server for you. You
should not need to work with the Format directly.

Regards,
-- 
Christopher Schmidt
MetaCarta
_______________________________________________
Users mailing list
[email protected]
http://openlayers.org/mailman/listinfo/users

Reply via email to