[OpenLayers-Users] Example of creating a POI with attributes

Mike Adair madair at dmsolutions.ca
Fri Jun 5 15:46:50 EDT 2009


I've added an example of using the WFS DescribeFeatureType response to 
create a form in my sandbox at:
http://svn.openlayers.org/sandbox/madair/examples/edit-feature-attributes.html

It will require either the proxy to be set up or a local instance of 
geoserver for the example to work.

I haven't hooked the layer up to a save strategy yet, nor do I have a 
DrawFeature control in there but it should show the main idea.

Mike

Roald de Wit wrote:
> Hi Mike,
>
> If you could make this control availabe somehow, that would be great! 
> It might be a nice candidate for an addin [1].
>
> Cheers, Roald
>
> [1] http://trac.openlayers.org/wiki/Addins
>
> Mike Adair wrote:
>> I did a EditFeatureAttributes control a few months ago that first did 
>> a WFS DescribeFeatureType query to determine the attributes for a 
>> feature type and then created a form with inputs for each attribute.  
>> It registered with featureAdded and featureSelected events on the WFS 
>> layer to open and populate the form.  Clicking on a 'save' button 
>> then triggered a Save strategy to do a WFS transaction to the DB.  I 
>> seem to recall that it needed some extra information about attribute 
>> types, primary keys, etc. but it was mostly driven from the 
>> DescribeFeatureType response.
>>
>> I don't think there is an example online anywhere yet but I could 
>> probably put the code somewhere if you were interested.
>>
>> Mike Adair
>>
>> Stephen Woodbridge wrote:
>>  
>>> Hi all,
>>>
>>> Does anyone have a public page/example that demonstrates creating a 
>>> point feature and adding text attributes to it? This seems like it 
>>> would be a common use case.
>>>
>>> Creating the vector feature is straight forward. It would be nice if 
>>> after you create the point, that you could click it and open a 
>>> balloon with fields that you could fill in and a save|cancel button 
>>> that would save it back to the server.
>>>
>>> Maybe this is two operations:
>>>
>>> 1) create or drag the marker for editing the location
>>> 2) click to edit attributes or to delete marker
>>>
>>> Mostly unsure on the attributes and the best way to glue all this 
>>> together.
>>>
>>> Suggestions and examples would be helpful.
>>>
>>> Thanks,
>>>    -Steve
>>> _______________________________________________
>>> Users mailing list
>>> Users at openlayers.org
>>> http://openlayers.org/mailman/listinfo/users
>>>
>>>       
>>
>>   
>
>

-- 
   Michael Adair
   Senior Software Architect
   DM Solutions Group Inc.

   Office: (613) 565-5056 x26
   madair at dmsolutions.ca
   http://www.dmsolutions.ca
   http://research.dmsolutions.ca





More information about the Users mailing list