Hornbydd

How do I keep a graphic in the map centre during panning?

Discussion created by Hornbydd on Nov 18, 2011
All,

I have created a simple graphic "bulls eye" in an MXD which is nothing more than a graphic point and circle grouped and given the group a name "Bulls Eye".

I want this graphic to stay in the centre of the map as users pan/zoom around the map.

I have created a VB .Net Addin extension and I've got it listening to DisplayEvents.DisplayScrolled and ActiveViewEvents.AfterDraw events.

The code sort of works. The user selects the Pan tool and they click and pan the map. The aerial imagery (currently the only layer load) pans as well as the graphic. The screen refreshes and then my bulls eye is relocated to the middle of the map.  The problem with this is as you pan the bulls eye pans too.

Is there another event I should be listening out too that allows me to relocate my graphic during the act of panning rather than at the end of the pan and when the screen refreshes?

Any advice would be much appreciated?

Duncan

Outcomes