GPS Track View
Plugin Introduction:
This sample is used to play the GPS track.
Control/Object/Interface:
Control/Object/Interface |
Properties |
Methods |
Plugin |
|
Initialize(), ExitInstance() |
CtrlAction |
FormClass |
Run() |
Application |
ActiveApplication, Output |
|
GeoLine |
|
AddPart() |
IFormMap |
MapControl |
|
MapControl |
Map |
Refresh() |
Map |
TrackingLayer |
Refresh(), EnsureVisible(), Zoom(), RefreshTrackingLayer() |
TrackingLayer |
|
Add() |
Basic Steps:
- Open GPSTrackView.sln in the SuperMap iDesktop 8C\SampleCode\GPSTrackView with Microsoft Visual Studio 2008 and compile it.
- When succeeded, you can find two files generated: SuperMap.Desktop.GPSTrackView.dll located in the SuperMap iDesktop 8C\Bin\Plugins\GPSTrackView folder and SuperMap.Desktop.GPSTrackView.config located in the SuperMap iDesktop 8C\WorkEnvironment\Default folder.
- Copy the SampleIcons folder from the SuperMap iDesktop 8C\SampleCode folder to SuperMap iDesktop 8C\SampleCode\Resources.
- Start SuperMap iDesktop 8C.
- Open shanghai.smwu provided in the SuperMap iDesktop 8C\SampleData\SampleCodeUsed\JingAn folder. When you open the JingAn map, you will find the GPS tab with the GPS and Play group on the Ribbon.
- On the GPS tab, in the GPS group, click the Import Track button to display the Open dialog box. Navigate to GPSLine.XLS provided in the SuperMap iDesktop 8C\SampleData\SampleCodeUsed folder, highlight it and click Open.
- The track of the GPS is displayed on the map.
- In the Play group, click Start to play and Pause to temporarily stop the play.
Data:
SuperMap iDesktop 8C\SampleData\SampleCodeUsed\Shanghai\JingAn.smwu.
Note:
When you successfully compile GPSTrackView.sln, SuperMap.Desktop.GPSTrackView.dll and SuperMap.Desktop.GPSTrackView.config will be generated and copied to SuperMap iDesktop 8C\Bin\Plugins\GPSTrackView and SuperMap iDesktop 8C\WorkEnvironment\Default respectively. Each time you start SuperMap iDesktop 8C, the GPSTrackView plugin will be loaded.
If you want to remove the GPSTrackView plugin from SuperMap iDesktop 8C, you only need to delete SuperMap.Desktop.GPSTrackView.config in the SuperMap iDesktop 8C\WorkEnvironment\Default folder.