[Users] Editing layers with no geometry column or multiple

Eric Lemoine eric.lemoine at camptocamp.com
Sun May 2 10:27:13 CEST 2010


On Friday, April 30, 2010, Charles Galpin  wrote:
> Hi All. I'm new to the list and have some newbie questions related to editing some data using GeoExt/OL/Geoserver/posgres/postgis. If this is not the best place to ask, please let me know where is.

Hi Charles

>
> I have made a good start to a little utility to visualize and edit some data but have a few problems I could use help with and it may be a general problem with the approach I am taking.
>
> I have two sets of data, one being start and end points defining some road segments, and the other being road links (this is navteq street data). I have a vector layer for the points using a multipoint geometry from postgis (maybe my first problem) and another vector layer for the street lines with a filter applied, and stores for each. The point data is bound to a GridPanel and a map, and the line data is bound to another GridPanel as well as the map.  The point data grid is populated on startup and when the user selects a row, the filter is applied to the line layer and refreshed, and the line grid gets populated as well as zooming the map to the extent covered.  Using a DrawFeature control I have been able to edit my points and save them back to the database.
>
> So the 2 main problems I have are right now are
>
> 1. How can I treat these two points differently in terms of styling? I would like to style the start point differently from the end point so you can tell which is which.  I put them in a multipoint because I didn't see how to handle individual lat/lon pairs (which I have) or have multiple geometries per row/feature.

To my knowledge you can't style points of a multipoint differently.
You'll have to somehow use two different features, one for the start
point and one for the end point.

>
> 2. How can I differentiate between selecting a feature in a grid, versus on the map using a FeatureSelectionModel? When I select a row in the grid I want to zoom to the extent covered by the two points, but not when I click on one of the points on the map because if say I am zoomed in, it zooms me back out .

If you don't need feature selection on row selection and vice-versa
you can use a RowSelectionModel as opposed to a FeatureSelectionModel.
Else, you can probably keep your RowSelectionModel and register a
"rowclick" listener on the GridPanel, this listener will be executed
only when a row is clicked.

Hope it helps,

-- 
Eric Lemoine

Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex

Tel : 00 33 4 79 44 44 96
Mail : eric.lemoine at camptocamp.com
http://www.camptocamp.com


More information about the Users mailing list