I am trying to add a highlight area so that clients can click on another country to get information about that country. When I add the overlay I am getting a warning saying that this script is causing the browser to be slow. How can I have a highlight overlay and not get this warning?
Here is the code that I am using. I have loaded the Cntry02.shp file in my main layer.
Map1.HighlightOverlay.HighlightStyle =
new FeatureOverlayStyle(GeoColor.FromArgb(120, GeoColor.StandardColors.OrangeRed),GeoColor.StandardColors.Red, 1);
Map1.HighlightOverlay.Style = new FeatureOverlayStyle();
((LayerOverlay)Map1.CustomOverlays.First()).Layers.First().Open();
Collection<Feature> features =
((InMemoryFeatureLayer)((LayerOverlay)Map1.CustomOverlays.First()).Layers.First()).FeatureSource.
GetAllFeatures(ReturningColumnsType.AllColumns);
((LayerOverlay)Map1.CustomOverlays.First()).Layers.First().Close();
foreach (var feature in features)
{
Map1.HighlightOverlay.Features.Add(feature);
}