2

My organization is working on an ArcEngine application that displays a GPS cursor for the user's current position. We are using custom-made GPS code since ESRI's is buggy in ArcGIS 10. Whenever the GPS cursor's position changes, the entire graphics layer redraws rather than just the cursor. This results in a map whose labels are constantly flashing as the cursor moves. We are pretty sure that the problem is caused by having the GPS cursor displaying on the same graphics layer as the labels and any other graphics, but we haven't had any luck finding a way to use multiple graphics layers.

Is there a way to have multiple graphics layers in ArcEngine 10?

2
  • Can you post the part of the code where you refresh the graphics? Commented Mar 22, 2012 at 18:28
  • Any chance you would be willing to share info on how to access a devices GPS infor for ArcEngine? I'm trying to build an app for a trimble and need to get coordinates from the device's GPS.
    – rgwozdz
    Commented Sep 5, 2012 at 20:22

1 Answer 1

3

I don't think the problem is that you don't have two (or more) graphics layers. The problem is the label engine. Labels are drawn after graphics are drawn in order to optimise placement.

In order for your marker to move, you must update the display. When you update the display, the map redraws itself from the bottom layer up to the top layer, then it places the labels. To minimise flickering you could refresh only a part of the display using IActiveView.PartialRefresh. To move the marker you must update the old location and the new location. This leaves the rest of the screen untouched. As a side effect you could end up with partial labels, double labels and missing labels around the areas you update. It might speed things up to only refresh the graphics phase, but it seems like graphics and labels are in the same phase.

If that's still not good enough, try the graphics tracker:

http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#/Using_a_GraphicTracker/0001000004tv000000/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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