AnsweredAssumed Answered

How to Overlap Labels

Question asked by ccposton on Oct 17, 2012
Latest reply on Oct 25, 2012 by ccposton
Hello,

I have a problem related to labeling. My labeling code is below, and it works well except for one scenario. Sometimes I will add a polygon programatically, using IGraphicsContainer. The polygon rests on top of a section of my feature layer. The problem is that the labels that I have set on the feature layer disappear in the region where the polygon is on top (see here). What can I do to make the labels still be visible regardless of whether there's a polygon on top of it or not? I tried playing with the weights below, but to no avail.

Thanks!
George Faraj



var annotateLayerPropertiesCollection = geoFeatureLayer.AnnotationProperties; annotateLayerPropertiesCollection.Clear();  var labelEngineLayerProperties = new LabelEngineLayerPropertiesClass();  var basicOverposterLayerProperties = labelEngineLayerProperties.BasicOverposterLayerProperties  as IBasicOverposterLayerProperties4;  basicOverposterLayerProperties.NumLabelsOption = esriBasicNumLabelsOption.esriOneLabelPerShape; basicOverposterLayerProperties.GenerateUnplacedLabels = false; basicOverposterLayerProperties.FeatureType = esriBasicOverposterFeatureType.esriOverposterPolygon; basicOverposterLayerProperties.PolygonPlacementMethod = labelParms.PlacementMethod; basicOverposterLayerProperties.LabelWeight = esriBasicOverposterWeight.esriLowWeight; basicOverposterLayerProperties.FeatureWeight = esriBasicOverposterWeight.esriLowWeight; basicOverposterLayerProperties.PlaceOnlyInsidePolygon = (labelParms.LabelType == GisLabelType.Text);  SetLabelSimpleExpression(labelParms, labelEngineLayerProperties);  labelEngineLayerProperties.Offset = 200d; labelEngineLayerProperties.Symbol = GetTextSymbol(labelParms);  var annotateLayerTransformationProperties = labelEngineLayerProperties as IAnnotateLayerTransformationProperties; annotateLayerTransformationProperties.ReferenceScale = GetReferenceScale( geoFeatureLayer, labelParms.Font.Size );  var annotateLayerProperties = labelEngineLayerProperties as IAnnotateLayerProperties; annotateLayerProperties.AnnotationMaximumScale = labelParms.MaxScale; annotateLayerProperties.AnnotationMinimumScale = labelParms.MinScale; annotateLayerProperties.Priority = 0; annotateLayerProperties.CreateUnplacedElements = false; annotateLayerProperties.LabelWhichFeatures = esriLabelWhichFeatures.esriVisibleFeatures;

Outcomes