ESRI.ArcGIS.Mobile
GpsConnection Class
Members  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

//Declare a generic GPS connection variable

GpsConnectionGpsConn =null;

//Use FileGPSConnection if you are reading GPS data from a file

GpsConn = fileGpsConnection1;

//Uncoment 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 buidling 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

Namespace: ESRI.ArcGIS.Mobile.Gps

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

Assembly: ESRI.ArcGIS.Mobile (in ESRI.ArcGIS.Mobile.dll)

See Also