Hi,
I was wondering if someone can help me regarding the editing of existing layers. Here is my scenario: The user log into the system and use the map shapes to draw different shapes. He saves this and log out. Next time he logs in he wants to continue adding shapes and also remove or edit the existing shapes. Do I edit a normal layer or do I still use the memorylayer? This is what I have tried to do:
I used the example that I received on creating shapes and saving to a shape file. I've created a new shapefile and added a memory layer that allows the user to add shapes. At the moment I have 3 shape files, Polygon, Point and Line and one memory layer. On the save of the memory layer I check the type of the shape/feature and save to the relevant shapefile.
If the user log in the next time I try and load the existing shapes into the memory layer and when he save again I recreate the shape file. It does not work that well because I notice that the user has to be in editmode before he can add shapes to the existing memory layer. If he is not in editmode then it seems that duplicated shapes are created or I loose some of the shapes when I save.
Any advise on how to edit existing layers? Do I have to use the InMemoryFeatureLayer or can I edit a normal ShapeFileFeatureLayer?
Thanks very much!
Sonja