Sunday, 13 September 2015

postgis - I want to edit corresponding postgresql data of a vector from openlayers- how to do it?


I want to edit the corresponding text/numeric data type columns of a vector through openlayres, when a user click/mouse over a vector. like,


http://dev4.mapgears.com/bdga/bdgaWFS-T.html#


any tutorial page for how to do it? I gone through it , it was difficult for me to understand from its js codes.


-- asked in stackoverflow, but no answers. based on a comment, i posted the same question here.



Answer



"How" you do it is likely strongly linked to your toolset. But, I suspect in any toolset your flow will be something like this:



  1. Select the feature you want to edit (by map click, by search, etc...) and store the unique identifier.


  2. Retrieve the row from the database using the unique identifier as the filter.

  3. Parse the database row and create an "editor" (combobox, textbox, datepicker, etc...) for each column.

  4. Present the user with an interface based on the current values in the row and the editors.

  5. As the user enters / modifies data validate the input.

  6. On save, fashion an update query based on the user provided values and using the unique identifier as the filter.

  7. If you are using attribute information the user can edit to render the map (e.g. road symbol is based on roadtype attribute which is editable) then update the map.


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...