Hello,
I am showing vehicle trip on the map. On each and every vehicle position, I am showing labels contains VehicleCode with position time and speed. The problem is when I do full level zoom its looks perfact but when I do low level zoom, labels become overlap and not looking good. Please find the following image for your reference.
For display label on the map, I have done following code:
--------------------------------CODE--------------------------------------------
InMemoryFeatureLayer markerLabelsOverlay = new InMemoryFeatureLayer();
markerLabelsOverlay.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;
markerLabelsOverlay.ZoomLevelSet.ZoomLevel01.DefaultTextStyle = TextStyles.CreateSimpleTextStyle("Name", "Verdana", 10, DrawingFontStyles.Bold, GeoColor.StandardColors.Black, -58, 15);
DrawingFontStyles.Bold,
markerLabelsOverlay.ZoomLevelSet.ZoomLevel01.DefaultTextStyle.OverlappingRule = LabelOverlappingRule.NoOverlapping;
markerLabelsOverlay.ZoomLevelSet.ZoomLevel01.DefaultTextStyle.FittingLineInScreen = true;
markerLabelsOverlay.ZoomLevelSet.ZoomLevel01.DefaultTextStyle.FittingPolygon = true;
markerLabelsOverlay.ZoomLevelSet.ZoomLevel01.DefaultTextStyle.SplineType = SplineType.StandardSplining;
markerLabelsOverlay.ZoomLevelSet.ZoomLevel01.DefaultTextStyle.SuppressPartialLabels = true;
markerLabelsOverlay.ZoomLevelSet.ZoomLevel01.DefaultTextStyle.GridSize = 10;
markerLabelsOverlay.ZoomLevelSet.ZoomLevel01.DefaultTextStyle.BestPlacement = true;
markerLabelsOverlay.ZoomLevelSet.ZoomLevel01.DefaultTextStyle.DrawingLevel = DrawingLevel.LevelOne;
markerLabelsOverlay.FeatureSource.CustomColumnFetch += new EventHandler<customcolumnfetcheventargs>(MarkerLabels_CustomColumnFetch);
markerLabelsOverlay.ZoomLevelSet.ZoomLevel01.DefaultTextStyle.RequiredColumnNames.Add("Name");
this.DynamicOverlay.Layers.Add("Vehicle Marker Labels", markerLabelsOverlay);</customcolumnfetcheventargs>
------------------------------------------------------------------------------------------
What should I do, when labels that overlap? Please give solution for that. If possible, give sample code for more understanding.
Thanks,
Badal Patel