Thursday, June 22, 2006

The Pocket GTViewer Control for .NET Development


GTI announces a new development tool aimed at the handheld device market.

On the Desktop/Laptop platforms, GTViewer is our off-the-self viewing and analysis product. While GTViewer is easily extended with custom applications, GTI also offers the GTVx ActiveX control to provide an even greater degree of control over the development process. GTVx can be used to create standalone applications, or it can be embedded into your existing applications to provide GTViewer functionality wherever you may need it.

The same level of development control provided by GTVx is now provided for the handheld platforms (Windows Mobile 2003, Windows Mobile 2003 SE, and Window Mobile 5.0).

Pocket GTViewer (the off-the-shelf product for devices) provides a sophisticated interface for creating VB.NET or C# applications to extend its functionality. Our GT/Field product was developed using only this interface, and it successfully all requirements. However, users have wanted more control over this development process just as they did in the form of the GTVx control on the desktop. The key feature missing from the Pocket GTViewer interface was the ability to actually embed Pocket GTViewer into your own applications (rather than interfacing with Pocket GTViewer). This ability is now supported with the Pocket GTViewer Control.

The new Pocket GTViewer Control is a .NET control for Smart Device Applications and can be used with VB.NET or C#. While similar in concept to GTVx, the PGTVControl is a lightweight implementation geared specifically for handheld devices. It currently supports Visual Studio .NET 2003, and a Visual Studio .NET 2005 version will be supported soon. The first version of the control is a view only tool, but redline support will be available soon as well.

The control already supports a wide range of features:
  • NMEA GPS support
  • ECW Raster
  • Feature and Point Capture
  • Attribute Info
  • Display Filter
  • Queries
  • Pan
  • Zoom
  • Fit Extents

An example of the Pocket GTViewer Control in the Visual Studio .NET development environment:



Simply place a PGTV_Control on your form as shown above.

Very little code is required in your application to get the control running:

OpenFileDialog fileDlg = new OpenFileDialog();

fileDlg.Filter = "GTViewer files (*.gtx)*.gtx";

if (fileDlg.ShowDialog() == DialogResult.OK)
{
g_pgtv.OpenFile(fileDlg.FileName, "");

g_pgtv.ActivateZoomMode();
}


This C# example (VB.NET is very similar) illustrates how well the Pocket GTViewer Control integrates with Visual Studio. Most of the code here is getting the file name to open with a standard .NET OpenFileDialog. Invocation of the OpenFile and ActivateZoomMode methods in the Pocket GTViewer Control are the only lines needed to get a fully functional viewing component in your Windows Mobile application.

The final result will look like the screenshot below:


No comments: