ZylGMaps Delphi & C++Builder Component

Class TZylWgs84Map

Description
Hierarchy
Fields
Methods
Properties

Unit

Declaration

type TZylWgs84Map = class(TPaintBox)

Description

WGS84 map class.

Hierarchy

Overview

Methods

Protected procedure Paint; override;
Protected procedure MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override;
Protected procedure MouseMove(Shift: TShiftState; X, Y: Integer); override;
Protected procedure Draw(); virtual;
Public constructor Create(AOwner: TComponent); override;
Public destructor Destroy(); override;
Public procedure DrawMap();
Public procedure RefreshMap;
Public procedure Reset;
Public procedure GetEpsg3857MapCoordinates( const LatitudeAsDecimalDegrees, LongitudeAsDecimalDegrees: Extended; var X, Y: Extended);
Public procedure GetCoordinatesFromEpsg3857Position(const X, Y: Extended; var LatitudeAsDecimalDegrees, LongitudeAsDecimalDegrees: Extended);
Public procedure GetEpsg4326MapCoordinates( const LatitudeAsDecimalDegrees, LongitudeAsDecimalDegrees: Extended; var X, Y: Extended);
Public procedure GetCoordinatesFromEpsg4326Position(const X, Y: Extended; var LatitudeAsDecimalDegrees, LongitudeAsDecimalDegrees: Extended);
Public procedure SaveMapToImage(fileName: String);

Properties

Public property CenterPosition: TGPSPosition read fCenterPosition write SetCenterPosition;
Public property CenterPositionMarker: TMarker read fCenterPositionMarker write fCenterPositionMarker;
Public property Markers: TMarkers read FMarkers write FMarkers;
Public property Paths: TPaths read FPaths write FPaths;
Public property Polylines: TPaths read FPaths write FPaths;
Public property Circles: TCircles read FCircles write FCircles;
Public property Rectangles: TRectangles read FRectangles write FRectangles;
Public property UnlockKey: String read FUnlockKey write FUnlockKey;
Published property MapImagePath: String read fMapImagePath write fMapImagePath;
Published property MapType: TWgs84MapType read fMapType write fMapType;
Published property West: Extended read FWest write FWest;
Published property North: Extended read FNorth write FNorth;
Published property East: Extended read FEast write Feast;
Published property South: Extended read FSouth write FSouth;
Published property IsBoundingBoxInDecimalDegrees: Boolean read FIsBoundingBoxInDecimalDegrees write FIsBoundingBoxInDecimalDegrees;
Published property OnMapClick: TPositionEvent read FOnMapClick write FOnMapClick;
Published property OnMapRightClick: TPositionEvent read FOnMapRightClick write FOnMapRightClick;
Published property OnMapMouseMove: TPositionEvent read FOnMapMouseMove write FOnMapMouseMove;
Published property OnMapCenterChange: TPositionEvent read FOnMapCenterChange write FOnMapCenterChange;

Description

Methods

Protected procedure Paint; override;

Paint method. You can override it.

Protected procedure MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override;

MouseDown method. You can override it.

Parameters
Button
Pressed button.
Shift
Shift state.
X
Cursor X coordinate.
Y
Cursor Y coordinate.
Protected procedure MouseMove(Shift: TShiftState; X, Y: Integer); override;

MouseMove method. You can override it.

Parameters
Shift
Shift state.
X
Cursor X coordinate.
Y
Cursor Y coordinate.
Protected procedure Draw(); virtual;

Draw the map. You can override it.

Public constructor Create(AOwner: TComponent); override;

Constructor.

Parameters
AOwner
Owner of the component.
Public destructor Destroy(); override;

Destructor.

Public procedure DrawMap();

Display the map.

Public procedure RefreshMap;

Refresh the map.

Public procedure Reset;

Reset the position to default value.

Public procedure GetEpsg3857MapCoordinates( const LatitudeAsDecimalDegrees, LongitudeAsDecimalDegrees: Extended; var X, Y: Extended);

Returns the pixel coordinates of CRS = EPSG:3857 map.

Parameters
LatitudeAsDecimalDegrees
Latitude in decimal degrees.
LongitudeAsDecimalDegrees
Longitude in decimal degrees.
X
X coordinate on the map.
Y
Y coordinate on the map.
Public procedure GetCoordinatesFromEpsg3857Position(const X, Y: Extended; var LatitudeAsDecimalDegrees, LongitudeAsDecimalDegrees: Extended);

Returns latitude and longitude in decimal degrees from pixel coordinates of CRS = EPSG:3857 map.

Parameters
X
X coordinate on the map.
Y
Y coordinate on the map.
LatitudeAsDecimalDegrees
Latitude in decimal degrees.
LongitudeAsDecimalDegrees
Longitude in decimal degrees.
Public procedure GetEpsg4326MapCoordinates( const LatitudeAsDecimalDegrees, LongitudeAsDecimalDegrees: Extended; var X, Y: Extended);

Returns the pixel coordinates of CRS = EPSG:4326 map.

Parameters
LatitudeAsDecimalDegrees
Latitude in decimal degrees.
LongitudeAsDecimalDegrees
Longitude in decimal degrees.
X
X coordinate on the map.
Y
Y coordinate on the map.
Public procedure GetCoordinatesFromEpsg4326Position(const X, Y: Extended; var LatitudeAsDecimalDegrees, LongitudeAsDecimalDegrees: Extended);

Returns latitude and longitude in decimal degrees from pixel coordinates of CRS = EPSG:4326 map.

Parameters
Y
X coordinate on the map.
Y
Y coordinate on the map.
LatitudeAsDecimalDegrees
Latitude in decimal degrees.
LongitudeAsDecimalDegrees
Longitude in decimal degrees.
Public procedure SaveMapToImage(fileName: String);

Save the current map to jpeg image.

Parameters
fileName
Jpeg image file.

Properties

Public property CenterPosition: TGPSPosition read fCenterPosition write SetCenterPosition;

Center position coordinates.

Public property CenterPositionMarker: TMarker read fCenterPositionMarker write fCenterPositionMarker;

Marker for the center position.

Public property Markers: TMarkers read FMarkers write FMarkers;

List of markers to be shown on the map, except center position marker.

Public property Paths: TPaths read FPaths write FPaths;

Paths to be shown on the map as polylines.

Public property Polylines: TPaths read FPaths write FPaths;

Paths to be shown on the map as polylines.

Public property Circles: TCircles read FCircles write FCircles;

List of circles to be shown on the map.

Public property Rectangles: TRectangles read FRectangles write FRectangles;

List of rectangles to be shown on the map.

Public property UnlockKey: String read FUnlockKey write FUnlockKey;

It is used to protect your software after deployment. You will have to set it to the correct value, before drawing. You will find the key in your software package.

Published property MapImagePath: String read fMapImagePath write fMapImagePath;

Map Image. Can be Jpeg, png, gif or bitmap.

Published property MapType: TWgs84MapType read fMapType write fMapType;

Map projection type.

Published property West: Extended read FWest write FWest;

Bounding box west value.

Published property North: Extended read FNorth write FNorth;

Bounding box north value.

Published property East: Extended read FEast write Feast;

Bounding box east value.

Published property South: Extended read FSouth write FSouth;

Bounding box south value.

Published property IsBoundingBoxInDecimalDegrees: Boolean read FIsBoundingBoxInDecimalDegrees write FIsBoundingBoxInDecimalDegrees;

If your map's CRS = EPSG:3857, bounding box values are in meters (west=Xmin/east=Xmax/Ymin=south/Ymax=north). Use them directly and set this parameter to false.

Published property OnMapClick: TPositionEvent read FOnMapClick write FOnMapClick;

Occurs when the map is clicked.

Published property OnMapRightClick: TPositionEvent read FOnMapRightClick write FOnMapRightClick;

Occurs when the map is right clicked.

Published property OnMapMouseMove: TPositionEvent read FOnMapMouseMove write FOnMapMouseMove;

Occurs when the mouse moves over the map.

Published property OnMapCenterChange: TPositionEvent read FOnMapCenterChange write FOnMapCenterChange;

Occurs when the center of the map has changed.

Copyright © 2003 - 2026 by Zyl Soft. All rights reserved.
Generated by PasDoc 0.16.0.