This project is read-only.

Thread-Safe Way to AddFeature?

Dec 5, 2011 at 3:50 PM

How can I add features to a FeatureSet in a thread-safe way so that the Map control in my Windows Form will not try to enumerate the FeatureSet collection while I am in the middle of adding a feature?

I use a thread to load the shape data from a database source while the user can still pan around and use the map (kind of like how Google Earth dynamically loads).

 

MultiPolygon mp = new MultiPolygon(polyList.ToArray());

IFeature polyFeature = featureSet.AddFeature(mp);