Hello,
I am having a problem getting labels to render consitantly. I restricted my map to three stations in an effort to track down this problem. At my default zoom, one of the labels is chopped in half. This happens several places, I am just using 3 stations to show the problem.
If you zoom in one level, all three labels display properly
If I remove the 534 - MTVACA station from the map, the 502 - LBWS label will display properly at the default zoom level
This seems odd to me since both stations are no where near each other. And in other lcoations I have have labels taht overlap each other and they all display.
The features are divided into three Feature Layers which all belong to an in memory layer. One feature for the station name, one for the alarm icon (the colored circle) and one for the last meaurement value (the box on the top).
Here is my code defining those three layers
I have tried some suggestions from these forums, as you can see from my code, but nothing seems to be helping. any ideas?
I have also tried removing the visual earth layer completely and I experience the exact same problems albiet on a black background :)
Thanks,
Leon
LayerOverlay dynamicOverlay = new LayerOverlay();
dynamicOverlay.IsBaseOverlay = false;
//Creating the Feature Layer Alarm Icons
InMemoryFeatureLayer FL = createFeatureLayer(map.MapMinLong, map.MapMaxLat, map.MapMaxLong, map.MapMinLat, id);
ThinkGeo.MapSuite.Core.Style FS = getFeatureStyle();
FL.ZoomLevelSet.ZoomLevel01.CustomStyles.Add(FS);
PointStyle ps = new PointStyle();
ps.RequiredColumnNames.Add("stnID");
ps.RequiredColumnNames.Add("display");
ps.RequiredColumnNames.Add("stnName");
ps.RequiredColumnNames.Add("lastValue");
FL.ZoomLevelSet.ZoomLevel01.CustomStyles.Add(ps);
FL.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;
FL.DrawingFeatures += new EventHandler<DrawingFeaturesEventArgs>(FL_DrawingFeatures);
FL.FeatureSource.Projection = proj4;
dynamicOverlay.Layers.Add(FL);
//Creating the Feature Layer Text Labels
InMemoryFeatureLayer FL2 = createFeatureLayer(map.MapMinLong, map.MapMaxLat, map.MapMaxLong, map.MapMinLat, id);
FL2.ZoomLevelSet.ZoomLevel01.DefaultTextStyle = TextStyles.CreateSimpleTextStyle("stnName", "Arial", 7, DrawingFontStyles.Bold, GeoColor.StandardColors.Black, GeoColor.StandardColors.White, 5, -20, -12);
FL2.ZoomLevelSet.ZoomLevel01.DefaultTextStyle.RequiredColumnNames.Add("stnID");
FL2.ZoomLevelSet.ZoomLevel01.DefaultTextStyle.RequiredColumnNames.Add("display");
FL2.ZoomLevelSet.ZoomLevel01.DefaultTextStyle.RequiredColumnNames.Add("stnName");
FL2.ZoomLevelSet.ZoomLevel01.DefaultTextStyle.RequiredColumnNames.Add("lastValue");
FL2.ZoomLevelSet.ZoomLevel01.DefaultTextStyle.GridSize = 2;
FL2.ZoomLevelSet.ZoomLevel01.DefaultTextStyle.OverlappingRule = LabelOverlappingRule.AllowOverlapping;
FL2.ZoomLevelSet.ZoomLevel01.DefaultTextStyle.SuppressPartialLabels = false;
FL2.DrawingMarginPercentage = 50;
FL2.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;
FL2.DrawingFeatures += new EventHandler<DrawingFeaturesEventArgs>(FL_DrawingFeatures);
FL2.FeatureSource.Projection = proj4;
dynamicOverlay.Layers.Add(FL2);
//Creating the Feature Layer For Last Values
InMemoryFeatureLayer FL3 = createFeatureLayer(map.MapMinLong, map.MapMaxLat, map.MapMaxLong, map.MapMinLat, id);
FL3.ZoomLevelSet.ZoomLevel01.DefaultTextStyle = TextStyles.CreateSimpleTextStyle("lastValue", "Arial", 7, DrawingFontStyles.Regular, GeoColor.StandardColors.Black, -15, 30);
FL3.ZoomLevelSet.ZoomLevel01.DefaultTextStyle.RequiredColumnNames.Add("stnID");
FL3.ZoomLevelSet.ZoomLevel01.DefaultTextStyle.RequiredColumnNames.Add("display");
FL3.ZoomLevelSet.ZoomLevel01.DefaultTextStyle.RequiredColumnNames.Add("stnName");
FL3.ZoomLevelSet.ZoomLevel01.DefaultTextStyle.RequiredColumnNames.Add("lastValue");
FL3.ZoomLevelSet.ZoomLevel01.DefaultTextStyle.BestPlacement = true;
FL3.ZoomLevelSet.ZoomLevel01.DefaultTextStyle.GridSize = 2;
FL3.ZoomLevelSet.ZoomLevel01.DefaultTextStyle.OverlappingRule = LabelOverlappingRule.AllowOverlapping;
FL3.ZoomLevelSet.ZoomLevel01.DefaultTextStyle.SuppressPartialLabels = false;
AreaStyle AS3 = AreaStyles.CreateSimpleAreaStyle(GeoColor.StandardColors.LightYellow, GeoColor.StandardColors.Black);
FL3.ZoomLevelSet.ZoomLevel01.DefaultTextStyle.Mask = AS3;
FL3.ZoomLevelSet.ZoomLevel01.DefaultTextStyle.MaskMargin = 2;
FL3.ZoomLevelSet.ZoomLevel01.DefaultTextStyle.AllowLineCarriage = true;
FL3.DrawingMarginPercentage = 50;
FL3.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;
FL3.DrawingFeatures += new EventHandler<DrawingFeaturesEventArgs>(FL_DrawingFeatures);
FL3.FeatureSource.Projection = proj4;
dynamicOverlay.Layers.Add(FL3);