Frequently Asked Component Specific Questions
Options |
Display all FAQ items |
Displaying items 1 to 1 of 1, page 1 of 1
<< previous next >>
TMS FMX WebGMaps
TTMSFMXWebGMaps authentication
TTMSFMXWebGMaps authentication
It is recommended to use an API Key to authenticate your application with the Google Maps JavaScript API service. Retrieving an API Key is free and can be obtained at the Google Developers Console. Instructions can be found on this page: https://developers.google.com/maps/documentation/javascript/get-api-key
Make sure to enable the following APIs in Google’s Console:
- Google Maps JavaScript API
- Google Maps Directions API
- Google Maps Geocoding API
- Google Maps Geolocation API
- Google Maps Elevation API
The API Key should be assigned to the APIKey property, one time before the map is loaded, in the Form’s OnCreate event of an application.
Example:
procedure TForm1.FormCreate(Sender: TObject); begin TMSFMXWebGMaps1.APIKey := ''myAPIKey''; end;
When using the TTMSFMXWebGMapsGeocoding and/or TTMSFMXWebGMapsReverseGeocoding controls the API Key should be assigned the respective APIKey properties as well.
Example:
procedure TForm1.FormCreate(Sender: TObject); begin TMSFMXWebGMapsGeocoding1.APIKey := ''myAPIKey''; TMSFMXWebGMapsReverseGeocoding1.APIKey := ''myAPIKey''; end;