| cadetill's blog | Copyright © Xavier Martínez (cadetill) |
Class TGMCustomMap
Unit
Declaration
type TGMCustomMap = class(TGMComponent, IGMExecJS, IGMControlChanges)
Description
Base class for google.maps.Map class.
Implements IGMExecJS and IGMControlChanges interfaces.
More information at google.maps.Map class
Hierarchy
- TObject
- TPersistent
- TComponent
- TGMComponent
- TGMCustomMap
Overview
Fields
![]() |
FBrowser: TComponent; |
Methods
![]() |
constructor Create(AOwner: TComponent); override; |
![]() |
destructor Destroy; override; |
![]() |
function GetHTMLCode: string; |
![]() |
function GetJsonFromHTMLForms: string; virtual; abstract; |
![]() |
procedure Assign(Source: TPersistent); override; |
![]() |
procedure DoOpenMap; virtual; |
![]() |
procedure ExecuteJavaScript(FunctName, Params: string); virtual; abstract; |
![]() |
procedure LoadBlankPage; virtual; abstract; |
![]() |
procedure LoadMap; virtual; abstract; |
![]() |
procedure OnTimer(Sender: TObject); virtual; |
![]() |
procedure PropertyChanged(Prop: TPersistent; PropName: string); |
![]() |
procedure SetCenterProperty(LatLng: TGMLatLng); virtual; abstract; |
![]() |
procedure SetEnableTimer(State: Boolean); virtual; abstract; |
![]() |
procedure SetIntervalTimer(Interval: Integer); virtual; abstract; |
![]() |
procedure SetMapTypeIdProperty(MapTypeId: TGMMapTypeId); virtual; abstract; |
![]() |
procedure SetZoomProperty(Zoom: Integer); virtual; abstract; |
Properties
![]() |
property Active: Boolean read FActive write SetActive default False; |
![]() |
property AfterPageLoaded: TGMAfterPageLoaded read FAfterPageLoaded write FAfterPageLoaded; |
![]() |
property APIKey: string read FAPIKey write SetAPIKey; |
![]() |
property APILang: TGMAPILang read FAPILang write SetAPILang default lEnglish; |
![]() |
property APIRegion: TGMAPIRegion read FAPIRegion write SetAPIRegion default rUndefined; |
![]() |
property APIVer: TGMAPIVer read FAPIVer write SetAPIVer default avWeekly; |
![]() |
property ByciclingLayer: TGMByciclingLayer read FByciclingLayer write FByciclingLayer; |
![]() |
property IntervalEvents: Integer read FIntervalEvents write SetIntervalEvents default 50; |
![]() |
property KmlLayer: TGMKmlLayer read FKmlLayer write FKmlLayer; |
![]() |
property OnActiveChange: TNotifyEvent read FOnActiveChange write FOnActiveChange; |
![]() |
property OnBoundsChanged: TGMBoundsChangedEvent read FOnBoundsChanged write FOnBoundsChanged; |
![]() |
property OnCenterChanged: TGMLatLngEvent read FOnCenterChanged write FOnCenterChanged; |
![]() |
property OnClick: TGMLatLngEvent read FOnClick write FOnClick; |
![]() |
property OnContextmenu: TGMLatLngEvent read FOnContextmenu write FOnContextmenu; |
![]() |
property OnDblClick: TGMLatLngEvent read FOnDblClick write FOnDblClick; |
![]() |
property OnDrag: TNotifyEvent read FOnDrag write FOnDrag; |
![]() |
property OnDragEnd: TNotifyEvent read FOnDragEnd write FOnDragEnd; |
![]() |
property OnDragStart: TNotifyEvent read FOnDragStart write FOnDragStart; |
![]() |
property OnIntervalEventsChange: TNotifyEvent read FOnIntervalEventsChange write FOnIntervalEventsChange; |
![]() |
property OnMapTypeIdChanged: TGMMapTypeIdChangedEvent read FOnMapTypeIdChanged write FOnMapTypeIdChanged; |
![]() |
property OnMouseMove: TGMLatLngEvent read FOnMouseMove write FOnMouseMove; |
![]() |
property OnMouseOut: TGMLatLngEvent read FOnMouseOut write FOnMouseOut; |
![]() |
property OnMouseOver: TGMLatLngEvent read FOnMouseOver write FOnMouseOver; |
![]() |
property OnPrecisionChange: TNotifyEvent read FOnPrecisionChange write FOnPrecisionChange; |
![]() |
property OnPropertyChanges: TGMPropertyChangesEvent read FOnPropertyChanges write FOnPropertyChanges; |
![]() |
property OnZoomChanged: TGMZoomChangedEvent read FOnZoomChanged write FOnZoomChanged; |
![]() |
property Precision: Integer read FPrecision write SetPrecision default 0; |
![]() |
property TrafficLayer: TGMTrafficLayer read FTrafficLayer write FTrafficLayer; |
![]() |
property TransitLayer: TGMTransitLayer read FTransitLayer write FTransitLayer; |
Description
Fields
![]() |
FBrowser: TComponent; |
|
Browser where display the Google Maps map.
| |
Methods
![]() |
constructor Create(AOwner: TComponent); override; |
|
Class constructor.
Creates a TGMCustomMap object.
Parameters
| |
![]() |
destructor Destroy; override; |
|
Destructor class.
| |
![]() |
function GetHTMLCode: string; |
|
Returns the HTML code of map.html on gmmapres.res.
Internal use only.
ReturnsString with the HTML code. Exceptions raised
| |
![]() |
function GetJsonFromHTMLForms: string; virtual; abstract; |
|
Reads all fields of all HTML forms and returns a Json with their values.
ReturnsJson with the info. | |
![]() |
procedure DoOpenMap; virtual; |
|
Executes the necessary scripts to display the map in the browser.
| |
![]() |
procedure LoadBlankPage; virtual; abstract; |
|
LoadBlankPage method load the about:blank page.
Exceptions raised
| |
![]() |
procedure LoadMap; virtual; abstract; |
|
LoadMap method loads and shows the map.html to use Google Maps API.
The timeout for load page is 15 seconds.
Exceptions raised
| |
![]() |
procedure OnTimer(Sender: TObject); virtual; |
|
OnTimer control event of Timer that check events from map. Internal use only.
Parameters
| |
![]() |
procedure SetCenterProperty(LatLng: TGMLatLng); virtual; abstract; |
|
Assigns the new map center value readed from HTML map code.
@params LatLng The new TGMLatLng | |
![]() |
procedure SetEnableTimer(State: Boolean); virtual; abstract; |
|
Enables or disables the Timer that controls the map events.
For internal use. Parameters
| |
![]() |
procedure SetIntervalTimer(Interval: Integer); virtual; abstract; |
|
Set the interval of Timer that control de map events.
Internal use only.
Parameters
| |
![]() |
procedure SetMapTypeIdProperty(MapTypeId: TGMMapTypeId); virtual; abstract; |
|
Assigns the new MapTypeId value readed from HTML map code.
@params MapTypeId The new TGMMapTypeId | |
![]() |
procedure SetZoomProperty(Zoom: Integer); virtual; abstract; |
|
Assigns the new Zoom value readed from HTML map code.
@params Zoom The new zoom | |
Properties
![]() |
property Active: Boolean read FActive write SetActive default False; |
|
Activate or deactivate access to the map. | |
![]() |
property AfterPageLoaded: TGMAfterPageLoaded read FAfterPageLoaded write FAfterPageLoaded; |
|
AfterPageLoaded event is fired when page is loaded.
If param See TGMAfterPageLoaded for more info. | |
![]() |
property APILang: TGMAPILang read FAPILang write SetAPILang default lEnglish; |
|
By default the API will attempt to load the most appropriate language based on the users location or browser settings.
But some APIs allow you to explicitly set a language when you make a request. More info at Localizing the Map and more specific at Supported Languages
Exceptions raised
| |
![]() |
property APIRegion: TGMAPIRegion read FAPIRegion write SetAPIRegion default rUndefined; |
|
When you load the Maps JavaScript API from maps.googleapis.com it applies a default bias for application behavior towards the United States.
If you want to alter your application to serve different map tiles or bias the application (such as biasing geocoding results towards the region), you can override this default behavior by adding a region. More info at Localizing the Map and more specific at Google Maps Platform Coverage Details
Exceptions raised
| |
![]() |
property APIVer: TGMAPIVer read FAPIVer write SetAPIVer default avWeekly; |
|
Version of the Google Maps API to use.
More info at Versioning
Exceptions raised
| |
![]() |
property ByciclingLayer: TGMByciclingLayer read FByciclingLayer write FByciclingLayer; |
|
Class for
More information at google.maps.BicyclingLayer class | |
![]() |
property IntervalEvents: Integer read FIntervalEvents write SetIntervalEvents default 50; |
|
Interval of time to check the events of map. | |
![]() |
property KmlLayer: TGMKmlLayer read FKmlLayer write FKmlLayer; |
|
Class for
More information at google.maps.KmlLayer class | |
![]() |
property OnActiveChange: TNotifyEvent read FOnActiveChange write FOnActiveChange; |
|
OnActiveChange event is fired when Active property value changes. | |
![]() |
property OnBoundsChanged: TGMBoundsChangedEvent read FOnBoundsChanged write FOnBoundsChanged; |
|
This event is fired when the viewport bounds have changed.
See TGMBoundsChangedEvent for more info. | |
![]() |
property OnCenterChanged: TGMLatLngEvent read FOnCenterChanged write FOnCenterChanged; |
|
This event is fired when the map center property changes.
This event changes the See TGMLatLngEvent for more info. | |
![]() |
property OnClick: TGMLatLngEvent read FOnClick write FOnClick; |
|
This event is fired when the user clicks on the map.
See TGMLatLngEvent for more info. | |
![]() |
property OnContextmenu: TGMLatLngEvent read FOnContextmenu write FOnContextmenu; |
|
This event is fired when the DOM contextmenu event is fired on the map container or when the user rightclicks on the map.
See TGMLatLngEvent for more info. | |
![]() |
property OnDblClick: TGMLatLngEvent read FOnDblClick write FOnDblClick; |
|
This event is fired when the user double-clicks on the map.
Note that the click event will also fire, right before this one. See TGMLatLngEvent for more info. | |
![]() |
property OnDrag: TNotifyEvent read FOnDrag write FOnDrag; |
|
This event is repeatedly fired while the user drags the map.
| |
![]() |
property OnDragEnd: TNotifyEvent read FOnDragEnd write FOnDragEnd; |
|
This event is fired when the user stops dragging the map.
| |
![]() |
property OnDragStart: TNotifyEvent read FOnDragStart write FOnDragStart; |
|
This event is fired when the user starts dragging the map.
| |
![]() |
property OnIntervalEventsChange: TNotifyEvent read FOnIntervalEventsChange write FOnIntervalEventsChange; |
|
OnIntervalEventsChange event is fired when IntervalEvents property value changes. | |
![]() |
property OnMapTypeIdChanged: TGMMapTypeIdChangedEvent read FOnMapTypeIdChanged write FOnMapTypeIdChanged; |
|
This event is fired whenever the user's mouse moves over the map container.
See TGMMapTypeIdChangedEvent for more info. | |
![]() |
property OnMouseMove: TGMLatLngEvent read FOnMouseMove write FOnMouseMove; |
|
This event is fired whenever the user's mouse moves over the map container.
See TGMLatLngEvent for more info. | |
![]() |
property OnMouseOut: TGMLatLngEvent read FOnMouseOut write FOnMouseOut; |
|
This event is fired when the user's mouse exits the map container.
See TGMLatLngEvent for more info. | |
![]() |
property OnMouseOver: TGMLatLngEvent read FOnMouseOver write FOnMouseOver; |
|
This event is fired when the user's mouse enters the map container.
See TGMLatLngEvent for more info. | |
![]() |
property OnPrecisionChange: TNotifyEvent read FOnPrecisionChange write FOnPrecisionChange; |
|
OnPrecisionChange event is fired when Precision property value changes. | |
![]() |
property OnPropertyChanges: TGMPropertyChangesEvent read FOnPropertyChanges write FOnPropertyChanges; |
|
Event fired when a property from and object changes.
Parameters
| |
![]() |
property OnZoomChanged: TGMZoomChangedEvent read FOnZoomChanged write FOnZoomChanged; |
|
This event is fired when the map zoom property changes.
See TGMZoomChangedEvent for more info. | |
![]() |
property Precision: Integer read FPrecision write SetPrecision default 0; |
|
Precision for lat and lng values.
Possibles values: | |
![]() |
property TrafficLayer: TGMTrafficLayer read FTrafficLayer write FTrafficLayer; |
|
Class for
More information at google.maps.TrafficLayer class | |
![]() |
property TransitLayer: TGMTransitLayer read FTransitLayer write FTransitLayer; |
|
Class for
More information at google.maps.TransitLayer class | |
Generated by PasDoc 0.15.0.

