cadetill's blog Copyright © Xavier Martínez (cadetill)

Class TGMMapChrm

Unit

Declaration

type TGMMapChrm = class(TGMMap)

Description

Base class for google.maps.Map class.

{$IFDEF CEF4Delphi}

Implements IGMExecJS and IGMControlChanges interfaces.

More information at google.maps.Map class

Hierarchy

Overview

Methods

Public constructor Create(AOwner: TComponent); override;
Protected procedure ExecuteJavaScript(FunctName, Params: string); override;
Protected procedure LoadBlankPage; override;
Protected procedure LoadMap; override;

Properties

Published property AboutGMLib;
Published property Active;
Published property AfterPageLoaded;
Published property APIKey;
Published property APILang;
Published property APIRegion;
Published property APIUrl;
Published property APIVer;
Published property Browser: TChromium read GetWebBrowser write SetWebBrowser;
Published property ByciclingLayer;
Published property IntervalEvents;
Published property KmlLayer;
Published property Language;
Published property MapOptions;
Published property OnActiveChange;
Published property OnBoundsChanged;
Published property OnCenterChanged;
Published property OnClick;
Published property OnContextmenu;
Published property OnDblClick;
Published property OnDrag;
Published property OnDragEnd;
Published property OnDragStart;
Published property OnIntervalEventsChange;
Published property OnMapTypeIdChanged;
Published property OnMouseMove;
Published property OnMouseOut;
Published property OnMouseOver;
Published property OnPrecisionChange;
Published property OnPropertyChanges;
Published property OnZoomChanged;
Published property TrafficLayer;
Published property TransitLayer;

Description

Methods

Public constructor Create(AOwner: TComponent); override;

Class constructor.

Creates a TGMCustomMap object.

Parameters
AOwner
Owner of the object.
Protected procedure ExecuteJavaScript(FunctName, Params: string); override;

Execute the JavaScript function FunctName with parameters Params.

If executed succefully returns True, otherwise False.

Parameters
FunctName
JavaScript function name to execute.
Params
Function parameters.
Protected procedure LoadBlankPage; override;

LoadBlankPage method load the about:blank page.

Exceptions raised
EGMIncorrectBrowser
This exception is raised when the Browser object isn't of the correct class.
EGMUnassignedObject
This exception is raised when the Browser property is not assigned.
Protected procedure LoadMap; override;

LoadMap method loads and shows the map.html to use Google Maps API.

The timeout for load page is 15 seconds.

Exceptions raised
EGMIncorrectBrowser
This exception is raised when the class of assigned browser isn't correct.
EGMUnassignedObject
This exception is raised when the Browser property is not assigned.

Properties

Published property AboutGMLib;

This property shows an "About" form with GMLib info.

Published property Active;

Activate or deactivate access to the map.

Published property AfterPageLoaded;

AfterPageLoaded event is fired when page is loaded.

If param First is True, the base HTML code es loaded. When False the map is loaded.

See TGMAfterPageLoaded for more info.

Published property APIKey;

APIKey is the Key to use on Google Maps.

To obtaining Api Key please check: https://developers.google.com/maps/documentation/javascript/get-api-key

Google Maps limits:

Exceptions raised
EGMMapIsActive
This exception is raised when Active property is True.
Published property APILang;

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
EGMMapIsActive
This exception is raised when Active property is True.
Published property APIRegion;

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
EGMMapIsActive
This exception is raised when Active property is True.
Published property APIUrl;

URL to Google Maps API page.

Published property APIVer;

Version of the Google Maps API to use.

More info at Versioning

Exceptions raised
EGMMapIsActive
This exception is raised when Active property is True.
Published property Browser: TChromium read GetWebBrowser write SetWebBrowser;

Browser where display the Google Maps map.

Published property ByciclingLayer;

Class for google.maps.BicyclingLayer class.

More information at google.maps.BicyclingLayer class

Published property IntervalEvents;

Interval of time to check the events of map.

Published property KmlLayer;

Class for google.maps.KmlLayer class.

More information at google.maps.KmlLayer class

Published property Language;

Language property specifies the language in which messages are displayed the exceptions raised by GMLib.

Published property MapOptions;

Base class for google.maps.MapOptions object from Google Maps API.

This class implements IGMControlChanges interface. More information at google.maps.MapOptions interface

Published property OnActiveChange;

OnActiveChange event is fired when Active property value changes.

Published property OnBoundsChanged;

This event is fired when the viewport bounds have changed.

See TGMBoundsChangedEvent for more info.

Published property OnCenterChanged;

This event is fired when the map center property changes.

This event changes the Center property.

See TGMLatLngEvent for more info.

Published property OnClick;

This event is fired when the user clicks on the map.

See TGMLatLngEvent for more info.

Published property OnContextmenu;

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.

Published property OnDblClick;

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.

Published property OnDrag;

This event is repeatedly fired while the user drags the map.

Published property OnDragEnd;

This event is fired when the user stops dragging the map.

Published property OnDragStart;

This event is fired when the user starts dragging the map.

Published property OnIntervalEventsChange;

OnIntervalEventsChange event is fired when IntervalEvents property value changes.

Published property OnMapTypeIdChanged;

This event is fired whenever the user's mouse moves over the map container.

See TGMMapTypeIdChangedEvent for more info.

Published property OnMouseMove;

This event is fired whenever the user's mouse moves over the map container.

See TGMLatLngEvent for more info.

Published property OnMouseOut;

This event is fired when the user's mouse exits the map container.

See TGMLatLngEvent for more info.

Published property OnMouseOver;

This event is fired when the user's mouse enters the map container.

See TGMLatLngEvent for more info.

Published property OnPrecisionChange;

OnPrecisionChange event is fired when Precision property value changes.

Published property OnPropertyChanges;

Event fired when a property from and object changes.

Parameters
Owner
Owner of property.
PropName
Property name.
Published property OnZoomChanged;

This event is fired when the map zoom property changes.

See TGMZoomChangedEvent for more info.

Published property TrafficLayer;

Executes the necessary scripts to display the map in the browser.

Published property TransitLayer;

Class for google.maps.TransitLayer class.

More information at google.maps.TransitLayer class


Generated by PasDoc 0.15.0.