Wednesday, 12 September 2018

arcgis 10.0 - Remove Layer Labels


public void LabelOff( IActiveView view, IGeoFeatureLayer geoFeatureLayer ) {
IAnnotateLayerPropertiesCollection annotationProperties =
geoFeatureLayer.AnnotationProperties;
annotationProperties.Clear();
geoFeatureLayer.DisplayAnnotation = false;
// Which one?

view.PartialRefresh( esriViewDrawPhase.esriViewGraphics,
geoFeatureLayer, null );
view.Refresh();
}

I use this code to remove labels for one specific layer. It only works with the view.Refresh(). Shouldn't the PartialRefresh() also work (without calling the view.Refresh()?)




No comments:

Post a Comment