[OpenLayers-Users] Re: Feature attribute editing/updating
jf at geonef.fr
Fri Aug 19 12:10:16 EDT 2011
If I understand well, the feature.attributes are successfully updated,
but when you call save() on the Save strategy, they are not saved?
Make sure you update the "state" property:
feature.state = OpenLayers.State.UPDATE;
If it still doesn't work, how do you call save?
If you have multiple layers, do you call save on each of these layer's
Does the HTTP request being made, or not at all? What protocol do you use, WFS?
Jean-François Gigand - Geonef
Paris, France - http://geonef.fr/
2011/8/19 killerz <eoinskilleen at gmail.com>:
> Hi Jean,
> What I want to do is enter some text into a blank attribute field I have in
> my data so it saves back to PostGIS upon updateAttributes().
> Im using the mobile capabilities of openlayers with geolocation to test how
> it works as a surveying tool on smartphones. So essentially i want to
> attribute the point i have surveyed on the ground so when I download the
> shapefile to QGIS/Arc I can select/style by attribute.
> Im using OpenLayers.Strategy.Save for saving the edited geometry via a save
> button (I have a points, lines and polygon layers). I am planning to trigger
> the popup when a new feature is created. I presume this will save all edits
> to the data including the text field. I am stuck on how to make these edits
> so they can be saved. If I write text in the current text box it disappears
> when i close it so it cant be saved.
> I also noticed he is using on old version of openlayers however there are
> not many examples of this online. If anyone has any alternative methods
> (using just openlayers) id be very interested.
> View this message in context: http://osgeo-org.1803224.n2.nabble.com/Feature-attribute-editing-updating-tp6703055p6703510.html
> Sent from the OpenLayers Users mailing list archive at Nabble.com.
> Users mailing list
> Users at lists.osgeo.org
More information about the Users