I am properbly missing something v.small
please look at the following code:
DataManager dataManager = new DataManager(
new QueryRequest(
new QueryActionStatement(
"SELECT","DataNode")));
dataManager.Execute();
var results = dataManager.GetResult() as Feature[];
//foreach (var feature in results)
//{
// map.EditOverlay.Features.Add(feature);
//}
InMemoryFeatureLayer featureLayer = new InMemoryFeatureLayer();
foreach (var feature in results)
{
featureLayer.InternalFeatures.Add(feature);
}
featureLayer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;
featureLayer.ZoomLevelSet.ZoomLevel01.DefaultLineStyle = LineStyles.InternationalBorder2;
featureLayer.ZoomLevelSet.ZoomLevel01.DefaultAreaStyle = AreaStyles.Country2;
LayerOverlay staticLayer = new LayerOverlay();
staticLayer.Layers.Add(featureLayer);
map.CustomOverlays.Add(staticLayer);
DataManager is a class I made which fetch me data from mssql server with features , now , when i run the following script , i dont see anything on the map , but if I am uncommeting the
//foreach (var feature in results)
//{
// map.EditOverlay.Features.Add(feature);
//}
lines , i see the objects v.clearly
p.s all the fetched features are lines