Dear all,

I am using in a bing map application the WPF control to interact with the map. I am actually dynamically draw circles on the map based on the area I am interrested in.

For that I am using the following code snipet :

public static LocationCollection DrawCircle(Location Loc, double dRadius,ShareTypes.BingMap.BingMapDistanceUnit Unit)
{
var locCollection = new LocationCollection();
var EarthRadius = GeoCodeCalc.EarthRadiusInMiles;
if (Unit == ShareTypes.BingMap.BingMapDistanceUnit.Kilometers)
EarthRadius = GeoCodeCalc.EarthRadiusInKilometers;
//Convert location to radians based on
var latitude = GeoCodeCalc.ToRadian(Loc.Latitude);
var longitude = GeoCodeCalc.ToRadian(Loc.Longitude);
//Angular distance covered on earth surface
var d = dRadius / EarthRadius;
for (int x = 0; x < 360; x++)
{
var angle = GeoCodeCalc.ToRadian(x); //radians
var latRadians = Math.Asin(Math.Sin(latitude) * Math.Cos(d) + Math.Cos(latitude) * Math.Sin(d) * Math.Cos(angle));
var lngRadians = longitude + Math.Atan2(Math.Sin(angle) * Math.Sin(d) * Math.Cos(latitude), Math.Cos(d) - Math.Sin(latitude) * Math.Sin(latRadians));
//Get location of the point
var pt = new Location(180.0 * latRadians / Math.PI, 180.0 * lngRadians / Math.PI);
//Add the new calculatied poitn to the collection
locCollection.Add(pt);
}
return locCollection;
}

My circle collection gets dranw and render as follow :

As you can see I can display successive circle on the map.

Now is there a way to access a particular circle in the collection and remove it ?

Thanks for help

regards

serge