Sample for saving polygon or any shape with Map suite 4.0 geometry

Franklin,


Thanks for your post and feedback.
I think the problem is probably hidden in the data testLoad.shp, could you open it in MapSuite Explorer to see if the name attribute has the value for it. I notice you use the following statement to add feature which no attributes were added.

shapeFileFetureLayer.EditTools.Add(polygonShape);

We have discussed this issue in another thread Post 8259 for this problem.
Any more questions please feel free to let me know.
Thanks.
Yale

Hi Yale, 
  
   Is it possible to save the modified polygon into the same file after editing? I have no clue how to do it. Could you help me out? 
 Thanks. 
  
 Franklin

Franklin,


Try following edit APIs by remove and add or Update, see following code snippet, hope it helps:

shapeFileFeturelayer.EditTools.Delete(feature.id);
shapeFileFeturelayer.EditTools.Add(feature);

 
Or
 

 shapeFileFeturelayer.EditTools.Update(feature);

 
Any more questions please feel free to let me know.
Thanks.
Yang