| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 6 年前 | ||
| 6 年前 | ||
| 9 年前 | ||
| 6 年前 | ||
| 6 年前 |
Move a graphic along a path in ArcMap
This sample implements the move-object-along-path functionality for ArcMap animation. It allows you to move a point graphic element or a text element along a selected line feature or a selected line graphic. A new animation type (Map Graphic animation type) and its corresponding keyframe (Map Graphic keyframe) are implemented to support moving a graphic along the path. It also implements an ArcMap command for creating a move-object-along-path animation. The purpose of this sample is to show how to create a custom animation type in ArcMap and how to implement an ArcMap command to import the animation tracks. To create a custom animation type, implement a new keyframe class and a new animation type class.
Language: C#, VB
Subject: Map
Organization: Esri, http://www.esri.com
Date: 10/17/2019
ArcObjects SDK: 10.8
Visual Studio: 2017, 2019
.NET Target Framework: 4.5
Resources
- ArcObjects .NET API Reference online
- Sample Data Download
- What's new
- Download the ArcObjects SDK for .Net from MyEsri.com
Usage
Add and use the move-graphic-along-path functionality in ArcMap
- Compile the sample project in Visual Studio.
- Start ArcMap and click Customize, Toolbars, and Animation. The Animation toolbar appears.
- Click Customize, then Customize Mode. The Customize dialog box appears.
- On the Commands tab, locate the Animation Developer Samples category.
- Drag the Move Graphic along Path command from the Animation Developer Samples category to the Animation drop-down on the Animation toolbar. Close the Customize dialog box.
- Add a line feature layer on to the table of contents (TOC) in ArcMap; or alternatively, draw a line graphic element on the ArcMap display.
- Draw a point graphic element (or a text element) on the display and symbolize it as necessary.
- Select the point graphic element (or the text element) and a line feature (or line graphic). The Move Graphic along Path command is enabled.
- On the Animation drop-down, click the Move Graphic along Path command.
- Accept all default settings and click the Import button on the Move Graphic along Path dialog box to create a track.
- Play the animation and the point graphic element (or text element) moves along the selected path.
Additional information
If more then one line feature (or line graphic) is selected, only the first one is used as the path of the movement.
You can elect to show the trace of the moving graphic element by selecting the Trace path option on the Move Graphic along Path dialog box when you create the track.
You can change the Trace path option after a track is created by opening the Animation Manager and selecting the track on the Tracks tab. Click Properties, then click the Graphic Track Properties tab. The Trace path option is available on this tab.
You can change the symbology for the point graphic element (or text element) and the line graphic representing the trace on the ArcMap display window.
Licensing
| Development licensing | Deployment licensing |
|---|---|
| ArcGIS Desktop Basic | ArcGIS Desktop Basic |
| ArcGIS Desktop Standard | ArcGIS Desktop Standard |
| ArcGIS Desktop Advanced | ArcGIS Desktop Advanced |