Hi.
There is problem. Code below where i add two layers to map. First LINE_KUCE - (Streets), Second (LINE_PROSPEKT) - prospekt. But map displace that An item with the same key already been added. I there is fields by name "NAME" in my oracle table. What is wrong? If i comment lines where i add DefaultTextStyle map display the layers without labels, but when i dont cooment map displays An Item With The Same Key Has Already Been Added error.
Please help to solve this problem.
//Kuce
OracleFeatureLayer kuce = new OracleFeatureLayer(
connectString1, "LINE_KUCE", "MI_PRINX");
kuce.ZoomLevelSet.ZoomLevel01.DefaultLineStyle = LineStyles.LocalRoad4;
kuce.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level15;
kuce.ZoomLevelSet.ZoomLevel15.DefaultLineStyle = LineStyles.LocalRoad3;
kuce.ZoomLevelSet.ZoomLevel15.DefaultTextStyle = TextStyles.LocalRoad3("NAME");
kuce.ZoomLevelSet.ZoomLevel15.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level17;
kuce.ZoomLevelSet.ZoomLevel17.DefaultLineStyle = LineStyles.LocalRoad2;
kuce.ZoomLevelSet.ZoomLevel17.DefaultTextStyle = TextStyles.LocalRoad2("NAME");
kuce.ZoomLevelSet.ZoomLevel17.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level19;
kuce.ZoomLevelSet.ZoomLevel19.DefaultLineStyle = LineStyles.LocalRoad1;
kuce.ZoomLevelSet.ZoomLevel19.DefaultTextStyle = TextStyles.LocalRoad1("NAME");
kuce.ZoomLevelSet.ZoomLevel19.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;
Map1.StaticOverlay.Layers.Add(kuce);
//Prospekt
OracleFeatureLayer propekt = new OracleFeatureLayer(connectString1, "LINE_PROSPEKT", "MI_PRINX");
propekt.ZoomLevelSet.ZoomLevel01.DefaultLineStyle = LineStyles.MajorRoad4;
propekt.ZoomLevelSet.ZoomLevel01.DefaultLineStyle = LineStyles.MajorRoad4;
propekt.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level15;
propekt.ZoomLevelSet.ZoomLevel15.DefaultLineStyle = LineStyles.MajorRoad3;
propekt.ZoomLevelSet.ZoomLevel15.DefaultTextStyle = TextStyles.MajorRoad3("NAME");
propekt.ZoomLevelSet.ZoomLevel15.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level17;
propekt.ZoomLevelSet.ZoomLevel17.DefaultLineStyle = LineStyles.MajorRoad2;
propekt.ZoomLevelSet.ZoomLevel17.DefaultTextStyle = TextStyles.MajorRoad2("NAME");
propekt.ZoomLevelSet.ZoomLevel17.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level19;
propekt.ZoomLevelSet.ZoomLevel19.DefaultLineStyle = LineStyles.MajorRoad1;
propekt.ZoomLevelSet.ZoomLevel19.DefaultTextStyle = TextStyles.MajorRoad1("NAME");
propekt.ZoomLevelSet.ZoomLevel19.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;
Map1.StaticOverlay.Layers.Add(propekt);