Dynamic biking


Purpose
This sample shows how to work with the geometry bridge in dynamic display and animate dynamic symbols. This sample can be used to play back any global positioning system (GPS) data saved in a GPS exchange format (GPX) or Garmin history (HST) format.

How to use

See How to use ArcGIS samples for help on compiling, setting up the debugger, and running the sample.

Data has been provided for your use with this sample. It can be found at <Your ArcGIS Developer Kit Install directory>/Samples/data/GPSRecording/biking.hst and <Your ArcGIS Developer Kit Install directory>/Samples/data/GPSRecording/run.gpx.
If the sample has associated data, you will find that the sample's zip file includes a "data" folder alongside the language folders. However, you will need to update the sample to point to the location of the data once you have extracted all the files.

  1. Start Visual Studio and open the solution file.
  2. Build the solution to make .dll files for the dynamic biking, dynamic biking track mode, and dynamic biking speed commands.
  3. Add the Dynamic Biking toolbar to an application with a MapControl and ToolbarControl, such as the MyDynamicDisplayApp sample located in the .NET samples folder.
  4. Click Add Data, choose the Shapefiles data type on the dialog box, then browse to <your ArcGIS developer kit install location >\Samples\data\SouthernCaliforniaRoadClip. Select SouthernCaliforniaRoadClip.shp and click Open to add it to the map.
  5. Make sure the map is in dynamic mode (see Additional Requirements for details, if you are not using the MyDynamicDisplayApp sample).
  6. Click the Dynamic Biking command, then browse to <your ArcGIS developer kit install location>/Samples/Data/GPSRecording on the dialog box for the Input Biking log file.
  7. Make sure the file type is set to .hst files, then open the biking.hst file.
  8. Zoom in the map around the bike image until the street lines in the city are shown clearly.
  9. Click Dynamic Biking Track mode to track the biking route with the animation of a heart beat.
  10. Change the biking speed by sliding the track bar.
  11. Click the Dynamic Biking command to stop the biking.
  12. To try the GPX format, click the Dynamic Biking command again and browse to the GPSRecording folder on the dialog box for the Input Biking log file.
  13. Make sure the file type is set to .gpx files, then open the run.gpx file.
  14. Change the biking speed by sliding the track bar.
  15. Turn off the dynamic map and close the application.

BikingTrackModeCmd.cs A command that switches to track mode.
DynamicBikingCmd.cs A command that tracks the GPS route.
DynamicBikingSpeedCmd.cs A command that changes the biking speed.
DynamicBikingSpeedCtrl.cs A track bar that sets the biking speed.
DynamicBikingToolbarClass.cs A toolbar that hosts the biking track mode, dynamic biking, and dynamic biking speed commands.
Download the C# files
BikingTrackModeCmd.vb A command that switches to track mode.
DynamicBikingCmd.vb A command that tracks the GPS route.
DynamicBikingSpeedCmd.vb A command that changes the biking speed.
DynamicBikingSpeedCtrl.vb A track bar that sets the biking speed.
DynamicBikingToolbarClass.vb A toolbar that hosts the biking track mode, dynamic biking, and dynamic biking speed commands.
Download the VB.NET files

Download the files for all languages

See Also:

How to use IGeometryBridge to update dynamic geometries
Walkthrough: Getting started with dynamic display
Dynamic display
How dynamic display works
Sample: Dynamic display layer
Sample: Dynamic display—tracking dynamic object




Additional Requirements
  • To have a GPS dataset to play back, GPX and HST files have been provided as the data paths.
  • To switch to dynamic mode, compile the DynamicDisplayHUD sample to retrieve the Toggle dynamic mode command located in the .NET samples category.

Development licensing Deployment licensing
Engine Developer Kit Engine Runtime
ArcView
ArcEditor
ArcInfo