Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I display a balloon callout after casting a axMapControl.Map to a IActiveView and doing this:

pGraphicsContainer = activeView as IGraphicsContainer;
pGraphicsContainer.AddElement(pElement, zOrder); 
pElement.Activate(activeView.ScreenDisplay); 

The problem is the balloon callout displays below the place labels layer. The text "Minneapolis" is visible on top of my balloon callout. I have tested zOrder with values from -10 to 10000 and the place labels still render on top of the balloon callout.

I am using ArcEngine 10 in VS2010 with C#

share|improve this question
add comment

1 Answer

up vote 6 down vote accepted

From the IGraphicsContainer.AddElement documentation:

The parameter zorder is currently not utilized by all of the IGraphicsContainer implementations and is typically set to 0 when calling this method.

You can alter the element z-order using methods like IGraphicsContainer.BringToFront, SendToBack, BringForward and SendBackward. I suppose GetElementOrder and SetElementOrder also serve for this purpose, allowing you to set the z-order at once, but I've never tested.

Anyway, this affects only the z-order of graphic elements, not layer labeling, which is a separate process. Depending on the layer label weight settings, labels draw next to graphic elements (using a placement conflict resolution algorithm) or above them. I remember I was able to tweak this behaviour by creating a separate graphics layer under the map's BasicGraphicsLayer, adding graphic elements to it, and setting this graphic layer's IBarrierProperties.Weight accordingly.

Hope this helps.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.