Hello,I have a problem with the application of **Maplex label, I use arcobjects with VB.netThis is code, gives no error but it appears just standard labels.any suggestions thank you.**
Public Sub Show_MaplexLabel(ByVal pGeoFeatureLayer As IGeoFeatureLayer, ByVal strFieldName As String) Dim maplexOverposterLayerProperties As IMaplexOverposterLayerProperties = New MaplexOverposterLayerProperties maplexOverposterLayerProperties.FeatureType = esriBasicOverposterFeatureType.esriOverposterPolygon maplexOverposterLayerProperties.CanStackLabel = True Dim pLabelEngineLayerProps As ILabelEngineLayerProperties2 = New MaplexLabelEngineLayerProperties pLabelEngineLayerProps.OverposterLayerProperties = maplexOverposterLayerProperties pLabelEngineLayerProps.Expression = "[" & strFieldName & "]" Dim pAnnoLayerPropsColl As IAnnotateLayerPropertiesCollection pAnnoLayerPropsColl = pGeoFeatureLayer.AnnotationProperties Dim pAnnoLayerProps As IAnnotateLayerProperties pAnnoLayerProps = pLabelEngineLayerProps pAnnoLayerPropsColl.QueryItem(0, pAnnoLayerProps, Nothing, Nothing) pGeoFeatureLayer.DisplayAnnotation = True MainForm.AxMapControl2.ActiveView.Refresh()End Sub
أكثر...
Public Sub Show_MaplexLabel(ByVal pGeoFeatureLayer As IGeoFeatureLayer, ByVal strFieldName As String) Dim maplexOverposterLayerProperties As IMaplexOverposterLayerProperties = New MaplexOverposterLayerProperties maplexOverposterLayerProperties.FeatureType = esriBasicOverposterFeatureType.esriOverposterPolygon maplexOverposterLayerProperties.CanStackLabel = True Dim pLabelEngineLayerProps As ILabelEngineLayerProperties2 = New MaplexLabelEngineLayerProperties pLabelEngineLayerProps.OverposterLayerProperties = maplexOverposterLayerProperties pLabelEngineLayerProps.Expression = "[" & strFieldName & "]" Dim pAnnoLayerPropsColl As IAnnotateLayerPropertiesCollection pAnnoLayerPropsColl = pGeoFeatureLayer.AnnotationProperties Dim pAnnoLayerProps As IAnnotateLayerProperties pAnnoLayerProps = pLabelEngineLayerProps pAnnoLayerPropsColl.QueryItem(0, pAnnoLayerProps, Nothing, Nothing) pGeoFeatureLayer.DisplayAnnotation = True MainForm.AxMapControl2.ActiveView.Refresh()End Sub
أكثر...