Serial port and GPS

BndBmpForm Class

Primarily for showing maps with the actial position.

For a list of all members of this type, see BndBmpForm Members.

System.Object
   System.MarshalByRefObject
      System.ComponentModel.Component
         System.Windows.Forms.Control
            System.Windows.Forms.ScrollableControl
               System.Windows.Forms.ContainerControl
                  System.Windows.Forms.Form
                     serial.BndBmpForm

[Visual Basic]
Public Class BndBmpForm
    Inherits Form
[C#]
public class BndBmpForm : Form

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Remarks

A form for showing a bitmap with defined bounds and a point with the current location within these bounds. The contructor of this class expects the name of the maps file with definition of the bitmap and bounds of the map. The map file consists of lines, one line for one map defintion. Format of each line according to the constructor of Maps.

Example

The following example maps file example.maps:

11d59m05.60sE 49d33m16.05sN 12d00m36.03sE 49d32m21.97sN sbach.bmp
6d37m44.00sE 43d16m26.95sN 6d39m10.66sE 43d15m29.04sN sttropez.jpg
defines two map entries, one in the bitmap file sbach.bmp with the boundaries: and the second map in the file sttropez.jpg with the boundaries The coordinates may be defined according to Utils.coord2dec(). Any bitmap format accepted by System.Drawing.Graphics.DrawBitmap is allowed. The name of the bitmap file may be either an absolute or relative path. Relative paths are automatically prepended by the path of the executing assembly. Example code:
[C#]
using serial;
public void showLocation() {
  BndMapForm f;
  MapPoint   pt;
  pt = new MapPoint("6d37m00.00sE", "43d16m00.00sN");
  f = new BndMapForm("example.maps");
  f.setPoint(pt);
  f.Show();
}
will start the form with the bitmap sttropez.jpg and with thick black point drawn somewhere in the middle of this bitmap. You'll have probably to scroll the bitmap a little bid to the bottom and right in order to see the point.

Requirements

Namespace: serial

Assembly: sgps (in sgps.exe)

See Also

BndBmpForm Members | serial Namespace | Maps | MapPoint | Utils.coord2dec()