ThinkGeo.com    |     Documentation    |     Premium Support

Map crash my application

Hi,


In my application, I allow user to draw polygon and edit the polygon on the map control.


The following code is the callback of my edit button:



winformsMap1.TrackOverlay.TrackMode =



TrackMode.None;foreach (Feature feature in winformsMap1.TrackOverlay.TrackShapeLayer.InternalFeatures)

 


The problem is that when the polygon is in the "edit" mode, when user zoom in/out with mouse scroll, the map crash my application.  Why it crashes? How to exit the "Edit" mode?


Please help.


 


Thanks,


 


Katherine



 


{


winformsMap1.EditOverlay.EditShapesLayer.InternalFeatures.Add(feature);


}


winformsMap1.EditOverlay.CalculateAllControlPoints();


winformsMap1.TrackOverlay.TrackShapeLayer.InternalFeatures.Clear();


winformsMap1.Refresh(winformsMap1.EditOverlay);



Katherine, 
  
 Thanks for your post. 
  
 We have a HowDoI sample showing how to track shape and then set those features into edit mode, can you have a check on this sample? 
 HowDoISamples\Editing Feature Layers\Track and edit shapes 
  
 If you still have problem, could you send me a small complete application to show your problem, which would be nice and helpful. 
  
 Thanks. 
  
 Yale