The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....



Interface of SDL_GeoMap



const
  MAXCALPOINTS = 10;    // max. number of calibration points per graticule line
  MAXCALLINES = 25;     // max. number of calibration lines per map
  MAXCALQUADS = 200;    // max. number of calibration quadruples
  MAXGMZOOMSTACK = 16;  // depth of zoom stack
  MapLRMargin = 30;     // left and right margin on blank maps
  MapTBMargin = 30;     // top and bottom margin on blank maps

{$IFDEF PAIDVERS}
  SDLVersionInfo = 'geomap_r1200_full';
  IsLightEd = false;
  MINMAGNIFY = 0.1;     // minimum magnification factor
  MAXMAGNIFY = 10.0;    // maximum magnification factor
  MAXMAPSIZE = 38000000; // max. map size in pixels (width x height of image)
{$ELSE}
  SDLVersionInfo = 'geomap_r1200_lighted';
  IsLightEd = true;
  MINMAGNIFY = 0.5;     // minimum magnification factor
  MAXMAGNIFY = 2.0;     // maximum magnification factor
  MAXMAPSIZE = 3000000; // max. map size in pixels (width x height of image)
{$ENDIF}
  Release = 1200;

type
  ESDLGeoMapError = class(ESDLError);     { exception type to indicate errors }
  TCoords = record
              Latit  : double;
              Longit : double;
            end;
  TgmZoomStackEntry = record
                        Left: integer;
                        Top : integer;
                        MagF: double;
                      end;
  TCorners = (gcoTopLeft, gcoBottomLeft, gcoBottomRight, gcoTopRight);
  TCornerArray = array[TCorners] of TCoords;
  TGratLineKind = (gtlMeridian, gtlParallel);
  TShowGrat = (sgNone, sgPoints, sgLines, sgPointsAndLines,
               sgUTMGrid, sgPointsAndUTMGrid);
  TLandMarkAction = (lmaAdd, lmaRemove);
  TLandMarkElement = (lmPlus, lmSquare, lmTriangle, lmCircle, lmArrowFrom,
                      lmArrowTo, lmCrossBox, lmSpade, lmCross, lmUserDef);
  TLMIdentifier = string[15];
  TLMText = string[80];
  TOnDrawMapDataEvent = procedure (Sender: TObject; MapCanvas: TCanvas;
          LatLow, LongLow, LatHigh, LongHigh: double; Wid, Hgt: integer);

const
  LMTypeNames : array[TLandMarkElement] of string =
                        ('Plus', 'Square', 'Triangle', 'Circle', 'ArrowFrom',
                         'ArrowTo', 'CrossBox', 'Spade', 'Cross', 'User-Defined');

{$IFDEF DEVELOPVERS}
   {$I intf_geomap_futurevers.pas}
{$ENDIF}

type
  TSymbolProperties = record
                        Kind        : TLandMarkElement;  // type of symbol
                        Size        : integer;           // size of symbol
                        FGColor     : TColor;            // foreground color
                        BGColor     : TColor;            // background color
                        Transparent : boolean;           // transparency
                        Direction   : integer;           // direction of symbol
                                                         // (arrows and triangles)
                        Length      : integer;           // length of symbol
                                                         //   (arrows only)
                      end;
  TLMTextProperties = record
                        Text        : TLMText;           // caption of landmark
                        Size        : integer;           // font size of caption
                        FontName    : TFontName;         // font name of caption
                        FontStyles  : TFontStyles;       // font style of caption
                        FGColor     : TColor;            // foreground color
                        BGColor     : TColor;            // background color
                        Transparent : boolean;           // transparency
                        dx          : integer;           // horizontal offset
                        dy          : integer;           // vertical offset
                        Direction   : integer;           // direction of text
                        HAlignment  : TAlignment;        // text alignment (horiz.)
                        VAlignment  : TVerticalAlignment;// text alignment (vert.)
                      end;

  TLandMark = record
                Latitude   : double;
                Longitude  : double;
                Altitude   : double;
                ClassFlag  : byte;
                Tag        : longint;
                SymbolProps: TSymbolProperties;
                Caption    : TLMTextProperties;
                Identifier : TLMIdentifier;
                Time       : TDateTime;
              end;

  TSymbol = record
              Properties : TSymbolProperties;
              Name       : string[40];        // name of symbol
              Category   : integer;           // category of symbol
            end;

  TCalibModel = (cmParabolicIp, cmBiquadraticPn, cmConicConformal,
                 cmMillerCylindrical, cmEquiRect, cmUTM, cmUndefined);
  TCalQuad = record
               Latitude  : double;
               Longitude : double;
               MapX      : integer;
               MapY      : integer;
             end;
  TCalibLine = record
                 LineType  : TGratLineKind;
                 LineValue : double;
                 NumPoints : integer;
                 CalPoints : array[1..MAXCALPOINTS] of TPoint;
               end;
  TCalibData = record
                 MapFName    : string;
                 Caption     : string;
                 Corners     : TCornerArray;
                 Resolution  : double; { meter/pixel }
                 NumCalLines : integer;
                 CalLines    : array[1..MAXCALLINES] of TCalibLine;
                 NumCalQuads : integer;
                 CalQuads    : array[1..MAXCALQUADS] of TCalQuad;
                 UTMZone     : integer;
                 UTMSouth    : boolean;
                 Ellipsoid   : TGeoEllipsoid;
               end;
  TRenderEvent = procedure (Sender: TObject; Canvas: TCanvas) of object;
  TDrawLandMarkEvent = procedure (Sender: TObject; var Handled: boolean;
                                  Canvas: TCanvas; APoint: TPoint;
                                  const LandMarkData: TLandMark) of object;
  TLandMarkActionEvent = procedure (Sender: TObject; var Allowed: boolean;
                                    const Action: TLandMarkAction;
                                    const LandMarkData: TLandMark) of object;
  TMapImgRequestEvent = procedure (Sender: TObject; var FileName: string) of object;

  TSymbolRepository = class (TComponent)
            private
              FSymbols      : array of TSymbol;
              FSymbolsBak   : array of TSymbol;
              FNEntries     : integer;
              FNEntriesBak  : integer;
              function GetValues (ix: integer): TSymbol;
              procedure SetValues (ix: integer; v: TSymbol);
              procedure SetNEntries (value: integer);
            protected
              procedure AssignTo (Dest: TPersistent); override;
            public
              constructor Create(AOwner: TComponent); override;
              destructor Destroy; override;
              procedure Assign(Source: TPersistent); override;
              procedure Backup;
              procedure Clear;
              function LoadFromFile (FName, DataID: string): boolean;
              function ReadFromOpenXMLFile (var InFile: TextFile;
                           DataID: string): boolean;
              procedure Restore;
              procedure StoreOnFile (FName, DataID: string);
              property Symbols[ix: integer]: TSymbol
                           read GetValues write SetValues; default;
            published
              property NumEntries: integer read FNEntries write SetNEntries;
            end;


  TGeoMap = class(TCustomControl) // TGraphicControl
            private
              AuxBmp             : TBitmap;             { double buffer bitmap }
              FImgCache          : TBitMap;{ image cache for magnifications < 0.5 }
              FCacheMag          : double;
              FCacheAA           : boolean;
              FCacheMagLimit     : double;{ limit where caching is switched on }
              FNumLandMarks      : integer;              { number of landmarks }
              FLandMarks         : array of TLandmark;{ collection of landmarks }
              FDefaultLM         : TLandMark;               { default landmark }
              FColorBakGnd       : TColor;
              FFrameStyle        : TFrameStyle;               { style of frame }
              FFrameColor        : TColor;
              FColorGratLine     : TColor;  // color of graticule lines
              FColorGratPoints   : TColor;  // color of calibration points
              FColBlackLine      : TColor;          { colors to draw the frame }
              FColGrayLine       : TColor;                       { -"- }
              FColWhiteLine      : TColor;                       { -"- }
              FEmptyMsg          : string; { message if no map image available }
              FLButtonWasDown    : boolean;{ global identifier to track panning
                                                          by left mouse button }
              FLMClassVisible    : array[0..255] of boolean;// visib. of landmarks
              FLMRandSampleLimit : longint;
              FMapImgName        : string;      // name of map image loaded
              FMapImgWidth       : integer;
              FMapImgHeight      : integer;
              FMagnify           : double;      // visual scale of map
              FZoomState         : TZoomState;
              FMouseBoxState     : TMouseBoxState;
              FMouseBoxX1        : integer;
              FMouseBoxX2        : integer;
              FMouseBoxY1        : integer;
              FMouseBoxY2        : integer;
              FMTrace            : array of TColoredPoint;//user-drawn mouse trace
              FNumMTrace         : integer;
              FColorMTrace       : TColor;
              FMTraceInvert      : boolean;
              FWindOldCornerX    : integer;
              FWindOldCornerY    : integer;
              FWindAnchorX       : integer;
              FWindAnchorY       : integer;
              FShowGrat          : TShowGrat;
              FTopLeft           : TPoint;
              FCalibModel        : TCalibModel;
              FBiQuadOops        : TCalQuad;    // container for last deleted
                                                // calibration point
                                                // (biquadratic polynomial)
              FParaIpOops        : TCalibLine;  // container for last deleted
                                                // calibration point
                                                // (parabolic interpolation)
              FRestoreBiQuadOK   : boolean;
              FRestoreParaIpOK   : boolean;
              FSuppressPaint     : boolean;
              FConfinePan        : boolean;
              FMouseAction       : TMouseActMode;{type of allowed mouse action }
              FRubberBandOn      : boolean;
              FSelectRectOn      : boolean;
              FRubberBAnchorX    : integer;
              FRubberBAnchorY    : integer;
              FRubberBandOldX    : integer;
              FRubberBandOldY    : integer;
              FAntiAlias         : boolean;
              FGratLineDist      : double;    // lat/long grid distance in degrees
              FUTMGridDist       : integer;   // UTM grid distance in meters
              FCalibData         : TCalibData;// original calibration data for
                                              // interpolated polynomials
              FGratMat           : TMatrix;   // equs. of parallels and meridians

                                             // equirectangular calibration
              FEquRectSPPL       : array[1..2,1..3] of double;
                            { calibration from sphere coords to map plane
                                   first index: 1 .... calibration for x
                                                2 .... calibration for y
                                  second index: a1..a3 of follow. calib. equation
                              pixel(x or y) := a1 + a2*Lat + a3*Long }
              FEquRectPLSP       : array[1..2,1..3] of double;
                            { calibration from map plane to sphere coords
                                   first index: 1 .... calibration for latitude
                                                2 .... calibration for longitude
                                  second index: a1..a3 of follow. calib. equation
                              Angle (latitude or longitude) := a1 + a2*x + a3*y }
              FCalParsPLSP       : array[1..2,1..6] of double;
                            { calibration from map plane to sphere coords
                                   first index: 1 .... calibration for latitude
                                                2 .... calibration for longitude
                                  second index: a1..a6 of follow. calib. equation
                              Angle (latitude or longitude) := a1 + a2*x + a3*y +
                                                 a4*x*x + a5*x*y + a6*y*y }
                                             // biquadratic calibration
              FCalParsSPPL       : array[1..2,1..6] of double;
                            { calibration from sphere coords to map plane
                                   first index: 1 .... calibration for x
                                                2 .... calibration for y
                                  second index: a1..a6 of follow. calib. equation
                              pixel(x or y) := a1 + a2*Lat + a3*Long + a4*Lat*Lat +
                                                a5*Lat*Long + a6*Long*Long }

                                      // Miller cylindrical calibration
              FMillercylPar      : array[1..2, 1..2] of double;
                           { first index: 1... calibration of latitude (Ry, dy)
                                          2... calibration of longitude (Rx, dx)
                                  x = Par[2,1]*Long + Par[2,2]
                                  y = Par[1,1]*ln(tan(Pi/4+0.4*Lat)) + Par[1,2] }

                                      // conic conformal calibration
              FConicPars         : array[1..6] of double;
                           { index 1: circle center x
                                   2: circle center y
                                   3: k - Latitude
                                   4: d - Latitude
                                   5: k - Longitude
                                   6: d - Longitude
                                   Lat = FConicPars[3]*sqrt(sqr(x-FConicPars[1]) +
                                         sqr(y-FConicPars[2])) + FConicPars[4]
                                   Long = FConicPars[5]*atan((x-FConicPars[1])/
                                          (y-FConicPars[2])) + FConicPars[6]
                                   }

              FHighLM            : integer;
              FHighLMColFG       : TColor;
              FHighLMColBG       : TColor;
              FHighLMTrans       : boolean;
              FTopLeftXAnchor    : integer;
              FTopLeftYAnchor    : integer;
              FOnDataLoading     : TProgressEvent;
              FOnDataRendered    : TRenderEvent;
              FOnBeforeRenderData: TRenderEvent;
              FOnDrawLandmark    : TDrawLandmarkEvent;
              FOnMapImgRequest   : TMapImgRequestEvent;
              FOnLMAction        : TLandMarkActionEvent;
              FOnZoomPan         : TZoomPanEvent;
              FOnBeginRubberBand : TOnRubberBandActionEvent;
              FOnContRubberBand  : TOnRubberBandActionEvent;
              FOnEndRubberBand   : TOnRubberBandActionEvent;
              FOnSelectRect      : TSelectRectEvent;
              FZoomStack         : array[1..MAXGMZOOMSTACK] of TgmZoomStackEntry;
              FZStackPoi         : integer;
              FCalDatName        : string;
              MouseAnchorX       : integer;   { anchor for relative mouse move }
              MouseAnchorY       : integer;
              FLastMClickPosX    : integer;     { position of last mouse click }
              FLastMClickPosY    : integer;
              FLastMMousePosX    : integer;     { last mouse position }
              FLastMMousePosY    : integer;
              GrafBmp            : TBitmap;       { off-screen graphics bitmap }
              procedure ConstructInternalMapImg;
              function  CalcUTMxFromEastingY (easting: double; y: integer): integer;
              function  CalcUTMyFromNorthingX
                           (northing: double; x: integer): integer;
              function  GetLastMClickLatitude: double;
              function  GetLastMClickLongitude: double;
              function  GetClassVisibility (i: byte): boolean;
              function  GetMapCaption: string;
              function  GetMTracePoint (idx: longint): TColoredPoint;
              function  GetLandMarkData (i: integer): TLandMark;
              procedure SetLandMarkData (i: integer; LandMark: TLandMark);
              function  GetZoomStackEntry (StackIx: integer): TgmZoomStackEntry;
              function  GetAllowPan: boolean;
              function  GetUTMZone: integer;
              procedure SetUTMZone (value: integer);
              function  GetUTMHemisphere: THemisphere ;
              procedure SetUTMHemisphere (value: THemisphere);
              procedure SetAllowPan (value: boolean);
              procedure SetAntiAlias (value: boolean);
              procedure SetClassVisibility (i: byte; value: boolean);
              procedure SetFrameStyle (value: TFrameStyle);
              procedure SetMapImgName (fname: string);
              procedure SetEmptyMsg (Msg: string);
              procedure SetColorBakGnd (color: TColor);
              procedure SetColorFrame (color: TColor);
              procedure SetColorGratLine (color: TColor);
              procedure SetColorGratPoints (color: TColor);
              procedure SetCalDatName (fname: string);
              procedure SetMapCaption (name: string);
              procedure SetGratLineDist (value: double);
              procedure SetUTMGridDist (value: integer);
              procedure SetShowGrat (mode: TShowGrat);
              procedure SetSuppressPaint (value: boolean);
              procedure SetRandSampleLimit (value: longint);
              procedure SetTopLeft (TL: TPoint);
              procedure SetMagnification (Scl: double);
              procedure SetMapBitMap (value: TBitMap);
              procedure SetHighLM (value: integer);
              procedure SetCalibModel (value: TCalibModel);
              procedure SetConfinePan (value: boolean);
              procedure SetCacheMagLimit (value: double);
              procedure ZoomStateOnStack;
              function  ReadCalDataIntern (SrcIsFile: boolean;
                           const InFile: TextFile; InStream: TStream;
                           DataID: string): boolean;
            protected
              procedure AssignTo (Dest: TPersistent); override;
              procedure MouseMove (Shift: TShiftState; X,Y: integer); override;
              procedure MouseDown(Button: TMouseButton; Shift: TShiftState;
                           X, Y: Integer); override;
              procedure MouseUp (Button: TMouseButton; Shift: TShiftState;
                           X, Y: Integer); override;
              procedure DoZoomPanEvent;
              procedure DoSelectRectEvent (Layer: integer; LoX, LoY, 
                           HiX, HiY: double);
              procedure DrawMouseTrace (xPos, yPos: integer; SrcBmp: TBitMap);
              procedure Paint; override;
              function  RecalcGratMat: boolean;
              procedure CalcBiquadraticCalibration;
              procedure CalcEquiRectCalibration;
              procedure CalcMillerCylCalibration;
              procedure CalcConicCalibration;
            public
              constructor Create(AOwner: TComponent); override;
              destructor Destroy; override;
              function  AddCalibPoint (GratLineKind: TGratLineKind;
                           LineValue: double; PixPosX,
                           PixPosY: integer): boolean; overload;
              function  AddCalibPoint (Latit, Longit: double; PixPosX,
                           PixPosY: integer): boolean; overload;
              function  AddCalibPoint (Northing, Easting: double;
                           Zone: integer; Hemisphere: THemisphere;
                           PixPosX, PixPosY: integer): boolean; overload;
              procedure AddLandMark (Lat, Long, Altitude: double;
                           Element: TLandMarkElement; ClassFlag: byte;
                           Identifier: TLMIdentifier; Time: TDateTime; Tag: longint;
                           ColorFG, ColorBG: TColor; Size: integer;
                           Transparent: boolean; Direction,
                           Length: integer); overload;
              procedure AddLandMark (Lat, Long, Altitude: double;
                           Identifier: TLMIdentifier;
                           Time: TDateTime); overload;
              procedure AddLandMark (Lat, Long, Altitude: double); overload;
              procedure AddLandMark (Lat, Long, Altitude: double;
                           CaptionText: string; CaptionSize: integer;
                           CaptionColor: TColor); overload;
              procedure AddLandMark (Lat, Long, Altitude: double;
                           Identifier: TLMIdentifier; Time: TDateTime;
                           CaptionText: string; CaptionSize: integer;
                           CaptionColor: TColor); overload;
              procedure Assign(Source: TPersistent); override;
              procedure BringLocationToCenter (Latitude, Longitude: double);
              procedure BringMapPixelToCenter (APoint: TPoint);
              procedure CalcExtentsAndResolution;
              procedure CalcExtentsOfPrint (MapWindow: TRect; Scale: integer;
                           var Width, Height: integer);
              function  CalcLatitude (x, y: integer;
                           var valid: boolean): double; overload;
              function  CalcLatitude (APoint: TPoint;
                           var valid: boolean): double; overload;
              function  CalcLongitude (x, y: integer;
                           var valid: boolean): double; overload;
              function  CalcLongitude (APoint: TPoint;
                           var valid: boolean): double; overload;
              function  CalcPixelCoords (Lat, Long: double;
                           var x,y: integer): boolean;
              function  CalcPixelCoordsUTM (Northing, Easting: double;
                           var x,y: integer): boolean;
              property  CalibData: TCalibData read FCalibData write FCalibData;
              property  CalibDataFile: string read FCalDatName write SetCalDatName;
              procedure CalibQuality (var QualX, QualY: double);
              property  Caption: string read GetMapCaption write SetMapCaption;
              procedure Clear;
              procedure ClearCalibData;
              procedure ClearMouseTrace;
              procedure ClearZoomHistory;
              procedure CopyEntireMapToClipboard;
              procedure CopyToBMP (DestBmp:TBitMap; TopLeft:TPoint; MagFact:double;
                           PosHoriz, PosVert, Width, Height: integer);
              procedure CopyToClipboard;
              procedure CreateAndLoadEmptyMap (FName: string; LatLow, LongLow,
                           LatHigh,LongHigh,dLat,dLong: double; Wid,Hgt: integer;
                           OnDrawMapData: TOnDrawMapDataEvent);
              procedure CreateEmptyMapInMemory (LatLow, LongLow, LatHigh, LongHigh,
                           dLat, dLong: double; Wid, Hgt: integer; ShowGrid: boolean;
                           OnDrawMapData: TOnDrawMapDataEvent);
              function  ControlToMapImage (const APoint: TPoint): TPoint;
              property  HighLightLandMark: integer read FHighLM write SetHighLM;
              procedure CopyToOpenPrinter (var x,y: integer;
                           ScaleF: double); overload;
              procedure CopyToOpenPrinter (MapWindow: TRect; Scale: integer;
                           PosHoriz, PosVert: integer); overload;
              procedure CopyToOpenPrinter (TopLeft: TPoint; Scale: integer;
                           PosHoriz, PosVert, Width, Height: integer); overload;
              function  FindLandMark (Lat,Long: double; ClassFlag: integer): integer;
              function  IsPositionWithinMap (Latit, Longit: double): boolean;
              property  LandMarkData[i: integer]: TLandMark
                           read GetLandmarkdata write SetLandmarkData;
              property  LandMarkDefault: TLandMark read FDefaultLM write FDefaultLM;
              property  LastClickLatitude: double read GetLastMClickLatitude;
              property  LastClickLongitude: double read GetLastMClickLongitude;
              property  LastClickPosX: integer read FLastMClickPosX;
              property  LastClickPosY: integer read FLastMClickPosY;
              property  LastMousePosX: integer read FLastMMousePosX;
              property  LastMousePosY: integer read FLastMMousePosY;
              property  LMClassVisible[i:byte]: boolean
                           read getClassVisibility write SetClassVisibility;
              property  LMRandomDisplayThreshold: longint
                           read FLMRandSampleLimit write SetRandSampleLimit;
              function  LoadCalDataFromXML (FName: string;
                           DataID: string): boolean; overload;
              function  LoadCalDataFromXML (InStream: TMemoryStream;
                           DataID: string): boolean; overload;
              function  LoadLandMarks (FName: string; DataID: string): boolean;
              property  Magnification: double read FMagnify write SetMagnification;
              function  MapImageToControl (const APoint: TPoint): TPoint;
              property  MapImgFile: string read FMapImgName write SetMapImgName;
              property  MapImgHeight: integer read FMapImgHeight;
              property  MapImgWidth: integer read FMapImgWidth;
              property  MapBitmap: TBitMap read GrafBmp write SetMapBitMap;
              function  MouseBox (var xLo, yLo, xHi, yHi: integer): boolean;
              procedure MouseBoxAbort;
              property  MouseTrace[idx: longint]: TColoredPoint
                           read GetMTracePoint;
              property  NumLandMarks: integer read FNumLandMarks;
              property  NumMTracePoints: longint read FNumMTrace;
              procedure PanMapToFillWindow;
              procedure PrintIt (ScaleF: double);
              function  ReadCalDataFromOpenXMLFile (var InFile: TextFile;
                           DataID: string): boolean;
              function  ReadLandMarksFromOpenXMLFile (var InFile: TextFile;
                           DataID: string): boolean;
              procedure RecalcCalibration;
              procedure RemoveAllLandMarks; overload;
              procedure RemoveAllLandMarks (ClassFlag: byte); overload;
              function  RemoveCalibPoint (PixPosX, PixPosY: integer)
                           : boolean; overload;
              function  RemoveCalibPoint (GratLineKind: TGratLineKind;
                           LineValue: double; PixPosX,
                           PixPosY: integer): boolean; overload;
              function  RemoveLandMark (Lat, Long: double; ClassFlag: integer;
                           Radius: double): integer; overload;
              function  RemoveLandMark (Rect: TRectDouble;
                           ClassFlag: integer): integer; overload;
              function  RemoveLandMark (Lat, Long: double;
                           ClassFlag: integer): integer; overload;
              function  RemoveLandMark (LmIndex: integer): integer; overload;
              procedure RemoveLastLandMark;
              function  RenameMapImg (Name: string): boolean;
              procedure ResizeMap (LongerEdgeLength: integer); overload;
              procedure ResizeMap (Magnification: double); overload;
              procedure RestoreLastDeletedCalPoint;
              procedure SaveCalDataAsXML (FileName, DataID: string); overload;
              procedure SaveCalDataAsXML (OutStream: TStream;
                           DataID: string); overload;
              procedure SaveLandmarks (FileName, DataID: string);
              procedure SaveMap (FileName, DataID: string);
              procedure SetHighLightProperties (ColorFG, ColorBG: TColor;
                           Transparent: boolean);
              property  SuppressPaint: boolean
                           read FSuppressPaint write SetSuppressPaint;
              property  TopLeft: TPoint read FTopLeft write SetTopLeft;
              procedure WriteCalDataToOpenXMLFile (var OutFile : TextFile;
                           CreateHeader: boolean; DataID: string);
              procedure WriteLandMarksToOpenXMLFile (var OutFile : TextFile;
                           CreateHeader: boolean; DataID: string);
              procedure ZoomFitPage;
              property  ZoomState: TZoomState read FZoomState;
              procedure ZoomHistory (Index: integer);
              property  ZoomStack [StackIx: integer]: TgmZoomStackEntry
                           read GetZoomStackEntry;

{$IFDEF DEVELOPVERS}
   {$I intf_geomap_futurevers2.pas}
{$ENDIF}
            published
              property Align;
              property AllowPan: boolean read GetAllowPan write SetAllowPan;
              property AntiAlias: boolean read FAntiAlias write SetAntiAlias;
              property CalibModel : TCalibModel
                          read FCalibModel write SetCalibModel;
              property CacheMagLimit: double
                          read FCacheMagLimit write SetCacheMagLimit;
              property ColorBackGnd: TColor
                          read FColorBakGnd write SetColorBakGnd;
              property ColorGraticule: TColor
                          read FColorGratLine write SetColorGratLine;
              property ColorCalibPoints: TColor
                          read FColorGratPoints write SetColorGratPoints;
              property ColorFrame: TColor
                          read FFrameColor write setcolorframe;
              property ConfinePanToMapImage: boolean
                          read FConfinePan write SetConfinePan;
              property DragCursor;
              property DragMode;
              property EmptyMsg: string read FEmptyMsg write SetEmptyMsg;
              property FrameStyle: TFrameStyle
                          read FFrameStyle write SetFrameStyle;
              property GratLineDist: double
                          read FGratLineDist write SetGratLineDist;
              property UTMGridDist: integer
                          read FUTMGridDist write SetUTMGridDist;
              property UTMZone: integer read GetUTMZone write SetUTMZone;
              property UTMHemisphere: THemisphere
                          read GetUTMHemisphere write SetUTMHemisphere;
              property MouseAction: TMouseActMode
                          read FMouseAction write FMouseAction;
              property MouseTraceColor: TColor
                          read FColorMTrace write FColorMTrace;
              property MouseTraceInvert: boolean
                          read FMTraceInvert write FMTraceInvert;
              property ParentShowHint;
              property PopupMenu;
              property ShowGraticule: TShowGrat read FShowGrat write SetShowGrat;
              property ShowHint;
              property Visible;
              property OnClick;
              property OnBeginRubberBand: TOnRubberBandActionEvent
                          read FOnBeginRubberBand write FOnBeginRubberBand;
              property OnContinueRubberBand: TOnRubberBandActionEvent
                          read FOnContRubberBand write FOnContRubberBand;
              property OnEndRubberBand: TOnRubberBandActionEvent
                          read FOnEndRubberBand write FOnEndRubberBand;
              property OnDataLoading: TProgressEvent
                          read FOnDataLoading write FOnDataLoading;
              property OnDataRendered: TRenderEvent
                          read FOnDataRendered write FOnDataRendered;
              property OnBeforeRenderData: TRenderEvent
                          read FOnBeforeRenderData write FOnBeforeRenderData;
              property OnDrawLandmark: TDrawLandmarkEvent
                          read FOnDrawLandmark write FOnDrawLandmark;
              property OnDblClick;
              property OnSelectRect: TSelectRectEvent
                          read FOnSelectRect write FOnSelectRect;
              property OnMapImageRequest: TMapImgRequestEvent
                          read FOnMapImgRequest write FOnMapImgRequest;
              property OnLandMarkAction: TLandMarkActionEvent
                          read FOnLMAction write FOnLMAction;
              property OnMouseDown;
              property OnMouseMove;
              property OnMouseWheel;
              property OnMouseWheelUp;
              property OnMouseWheelDown;
              property OnMouseUp;
              property OnStartDrag;
              property OnDragDrop;
              property OnEndDrag;
              property OnDragOver;
    {$IFNDEF ISCLX}  // Kylix does not know about OnCanResize
              property OnCanResize;
              property OnResize;
    {$ENDIF}
              property OnZoomPan: TZoomPanEvent read FOnZoomPan write FOnZoomPan;
            end;


function  DefaultSymbolRecord: TSymbol;
procedure DrawLandMarkSymbolOnCanvas (cv: TCanvas; x, y: integer;
             LMType: TLandMarkElement; colorFG, colorBG: TColor;
             size, dir, leng: integer; transp: boolean);
function  ParseCalibData (FName: string; DataID: string; var CalibData: TCalibData;
             var CalibModel: TCalibModel): boolean; overload;
function  ParseCalibData (InStream: TMemoryStream; DataID: string;
             var CalibData: TCalibData;
             var CalibModel: TCalibModel): boolean; overload;
function  PositionInMap (Latit, Longit: double; Corners: TCornerArray): boolean;
procedure WriteRawCalDataToOpenXMLFile (var OutFile : TextFile;
             CreateHeader: boolean; DataID: string; CalData: TCalibData;
             CalibModel: TCalibModel);





Last Update: 2023-Feb-06