ESRI.ArcGIS.Mobile
GpsConnection Class
Members  Example  See Also  Send Feedback
ESRI.ArcGIS.Mobile.Gps Namespace : GpsConnection Class

Abstract class for connections between a GPSDisplay and a GPS data source.

Object Model


Syntax

Visual Basic (Declaration) 
<DesignerCategoryAttribute("code")>
Public MustInherit Class GpsConnection 
   Inherits Component
C# 
[DesignerCategoryAttribute("code")]
public abstract class GpsConnection : Component 

Example

C#Copy Code
//Declare a generic GPS connection variable 
GpsConnection    GpsConn = null; 
 
//Use FileGPSConnection if you are reading GPS data from a file 
GpsConn = fileGpsConnection1; 
//Uncomment to Use SerialGPSConnection if you are reading GPS data from a device 
// GpsConn = serialPortGpsConnection1; 
//Use generic GPSConn variable for either type of connection 
Debug.WriteLine= GPSConn.Latitude.ToString(); 
Debug.WriteLine= GPSConn.Longitude.ToString(); 
Debug.WriteLine= GPSConn.Altitude.ToString(); 
Debug.WriteLine= GPSConn.FixStatus.ToString();

Remarks

This abstract class serves as the base for the SerialPort and FileGps connection classes. These connection classes are exposed as toolbox components. This class is useful when building your application to work with both live ( SerialPortConnection) or stored (FileGPSConnection) GPS information, since the code to display and use the GPS data is the same for both types. See the BasicGPS sample for code that uses both GPS sources.

Inheritance Hierarchy

System.Object
   System.MarshalByRefObject
      System.ComponentModel.Component
         ESRI.ArcGIS.Mobile.Gps.GpsConnection
            ESRI.ArcGIS.Mobile.Gps.NmeaGpsConnection

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2013 All Rights Reserved.