pan as my graphic tracker symbol moves

3512
36
08-14-2013 08:45 AM
DarcyHathaway
New Contributor
I need help to make the map pan as my graphic tracker symbol moves based on the GPS feed.
I am using Arc Object 10 with VS.net VB.
0 Kudos
36 Replies
LeoDonahue
Occasional Contributor III
Sadly, I program in Java and I my sample I would give you is for a MapServer, BUT....

It is really very easy.

You can probably translate this to .NET, I have faith in you.

Create a CenterAndScale object.  Use the method to center that accepts a point.  Assign it your GPS point.
Set the map extent to the CenterAndScale extent.
Refresh... .and there is your blip.

You have to refresh your map, the other layers have to draw, even when you pan/zoom.

Jeff Matson already pointed this out.  You can do things like partial refresh, or set map cache for your layers, or you can dissolved your data so that it draws really fast.

You mention that you are getting a GPS point two times per second.  That is really fast, why so fast? 

What you could do is use a timer to refresh your map every 5 or 10 seconds, and let the GPS tracker still plot away with the graphics.  If your map display shows enough area for a 2 or 3 mile range, I don't think your drivers will be able to drive faster than that distance in 5 or 10 seconds, but I don't know them personally.
0 Kudos
DarcyHathaway
New Contributor
The reason it is so fast is because this is an application for a helicopter and emergency vehicles and the point must move as fast as possible. The application shows them directions and the point must follow the line to the destination. If the map it zoomed out to far then the driver will not see the details of the direction line on the road.


I think a partial refresh should work too but I can�??t get it to work for me, I am sure I am doing something wrong with the syntax.

It seems to me that this has to be possible without the blip. The graphic tracker it supposed to work for 3D too and you would want the map to pan as it moved.
0 Kudos
DavidClarke1
New Contributor III
I have been trying to use the GraphicsTracker for a similar purpose.  When I add graphics to the graphic tracker, I get a flashing effect when any of the map layers have labels turned on.  If I turn off the labels for those layers, then the flashing goes away.

Also, enabling Dynamic Display will stop the flashing but there are many known limitations with Dynamic Display.  See the link.

http://resources.arcgis.com/en/help/arcobjects-net/conceptualhelp/index.html#//00010000004t000000
0 Kudos
DarcyHathaway
New Contributor
You should only have to create the graphic once and then just move the graphic. The graphic tracker won�??t refresh the screen as it moves. 

My blip is only when trying to pan the point to the center of the screen.
0 Kudos
DavidClarke1
New Contributor III
I do create the graphic once and then move the graphic.  The graphic tracker graphics do get refreshed because labeling and graphics are drawn in the same drawing phase.  This happens when I pan the map.

I have an open incident with ESRI regarding this.
0 Kudos
LeoDonahue
Occasional Contributor III
Maybe ArcGIS Desktop is not the right solution for map refreshes every 0.5 seconds for you.
0 Kudos
DarcyHathaway
New Contributor
I am now getting the same issue happening with the labels and the trackers graphic; let me know what you find out.

If the tracker graphic and the labels were working independently it would be working perfect.
0 Kudos
DavidClarke1
New Contributor III
I only mentioned these things because I am also using the GraphicsTracker for an application receiving constant GPS data and I support a function that "follows" a graphic around the map as it moves.  Essentially the same thing as dachenbach.

The blip mentioned sounded like the flashing I see but perhaps it is different.
0 Kudos
DarcyHathaway
New Contributor
Maybe ArcGIS Desktop is not the right solution for map refreshes every 0.5 seconds for you.


I am using Arc Engine
0 Kudos
DarcyHathaway
New Contributor
I only mentioned these things because I am also using the GraphicsTracker for an application receiving constant GPS data and I support a function that "follows" a graphic around the map as it moves.  Essentially the same thing as dachenbach.

The blip mentioned sounded like the flashing I see but perhaps it is different.


I am now getting the same issue happening with the labels and the trackers graphic; let me know what you find out.

If the tracker graphic and the labels were working independently it would be working perfect.
0 Kudos