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

Connection between GPSDisplay and a file containing NMEA sentences with GPS data.

Object Model


Syntax

Visual Basic (Declaration) 
<DefaultPropertyAttribute("Map")>
<DesignerCategoryAttribute("code")>
<XmlRootAttribute("FileGpsConnection")>
<ToolboxBitmapAttribute()>
Public Class FileGpsConnection 
   Inherits NmeaGpsConnection
C# 
[DefaultPropertyAttribute("Map")]
[DesignerCategoryAttribute("code")]
[XmlRootAttribute("FileGpsConnection")]
[ToolboxBitmapAttribute()]
public class FileGpsConnection : NmeaGpsConnection 

Example

// Create an instance of the class if not using the component

FileGpsConnection fileGPSConnection1 = new FileGpsConnection() ;

// Enable the connection;

fileGPSConnection1.Enabled = true

// Set the FileName to the location of the text file

fileGPSConnection1.FileName = "mygpspath.txt" ;

// Use the Open method to open and start reading the file

fileGPSConnection1.Open();

Remarks

The FileGpsConnection class is usually created when the component is added to the solution from the IDE toolbox, and not programmatically in code. This class uses an ASCII text file of stored NMEA GPS sentences instead of the streaming GPS sentences from a GPS receiver through a serial port. To receive GPS sentences from the component you must provide the class with a valid text file containing positional information, which adheres to the universally accepted NMEA standards. Once a connection to this file is established, the positional information is accessible through the NMEASentenceEventArgs class. If the NMEA sentence changes any of the properties of the NMEAGPSConnection class then the GPSChangedEvent is raised.

Note that the FileGpsConnection will NOT automatically return back to the beginning of the text file after it reaches the last line of the text, unless the Cycling property is set to True. (Default is False)

Inheritance Hierarchy

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

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