laptop and a wrench

Bogue

A graphics layer (Added through ArcObjects ICompositeGraphicsLayer) does not properly reproject on the fly.

Dernière publication: August 25, 2014 No Product Found
Numéro d’ID de bogue NIM002790
EnvoiJune 1, 2006
Dernière modificationJune 5, 2024
S’applique àNo Product Found
Version trouvée9.1
StatutNon-Reproducible

Informations supplémentaires

No Public Explanation

Solution de contournement

This code will add a layer to your map document that is connected to a newly created annotation group and then add a point the annotation group. When you turn the layer on and off the annotation group turns on and off. =================Public Sub CreateAnnoGroupGraphLayer()Dim pMxDoc As IMxDocumentDim pMap As IMapDim pGraLyr As ICompositeGraphicsLayerDim pEnumElement As IEnumElementDim pNewAnnoGroup As IGraphicsLayerDim pNewGraCont As IGraphicsContainerDim pElement As IElementSet pMxDoc = ThisDocumentSet pMap = pMxDoc.FocusMapSet pGraLyr = pMap.BasicGraphicsLayerSet pNewGraCont = pGraLyr'Create a graphics layerDim pLayer As ILayerSet pLayer = pGraLyr'Create the new graphics layer group and add the graphics layer to the map.Set pNewAnnoGroup = pGraLyr.AddLayer("New Anno", Nothing)Set pNewGraCont = pNewAnnoGrouppMap.AddLayer pNewGraCont'Make a pointDim pPnt As IPointSet pPnt = New PointpPnt.X = 32pPnt.Y = 35 'Set color and symbol for the pointDim pColor As IRgbColorSet pColor = New RgbColorpColor.Blue = 255pColor.Green = 0pColor.Red = 0Dim pSimpleMarkerSymbol As ISimpleMarkerSymbolSet pSimpleMarkerSymbol = New SimpleMarkerSymbolWith pSimpleMarkerSymbol .Style = esriSMSCircle .size = 8 .Color = pColorEnd With 'Create a marker elementDim pMarkerElement As IMarkerElementSet pMarkerElement = New MarkerElementpMarkerElement.Symbol = pSimpleMarkerSymbolSet pElement = pMarkerElementpElement.Geometry = pPnt 'Add the marker element ot the layer graphics containerSet pNewGraCont = pNewGraContpNewGraCont.AddElement pMarkerElement, 0 'Refresh/redraw the display with the new pointpMxDoc.ActiveView.RefreshEnd Sub

Étapes pour reproduire

ID de bogue: NIM002790

Logiciel:

  • No Product Found

Recevoir une notification lorsque le statut d’un bogue change

Télécharger l’application Esri Support

En savoir plus sur ce sujet

Obtenir de l’aide auprès des experts ArcGIS

Contacter le support technique

Télécharger l’application Esri Support

Accéder aux options de téléchargement