- Overview of Map control
- Creating a Map control
- Popup for displaying markers
- Displaying and handling maps
- Displaying the maps
- Maps handled by the user
- Specific features
- Internet Explorer: Required versions
- Map control and Google license
The Map control allows you to display a map in order to geolocate, display points of interest (POI) and more, ...
This map comes from:
- the Google Maps service for Web sites via the Google Maps API.
The use of the Map control is subject to specific terms and conditions. Depending on the use mode, you may have to use a Google key (MapLicenseGgl). Check the Google license before deploying your applications.
- the Bing Maps service for applications in Universal Windows 10 App mode.
- The use of the Map control is subject to specific terms and conditions. A Bing key must be used (MapLicenseBing). Check the Bing license before deploying your applications.
- Using an address specified with a string in a Map control may return inconsistent results. It is recommended to specify positions via variables of type Address or geoPosition.
The map displayed is interactive: you have the ability to zoom, move, ... It can be displayed in map view or satellite view.
Popup for displaying markers
Depending on the platform, when a preset window or page is used to manage marker popups, the following elements are included:
- FI_WinDevPopupMarqueur_WD (internal window in the WDFAA component).
These elements contain:
- two controls used to display the name and description of the marker.
- a declaration code to handle the current Marker variable.
Displaying and handling maps
Displaying the maps
When the window containing a Map control is opened, a world map is automatically displayed: the map is centered on Europe, with medium zoom level.
You can display the last position: simply select "Remember last position displayed" in the "Details" tab of the Map control description window. In this case, the last position is displayed with the same zoom level.
Internet Explorer: Required versions
In a WINDEV application, the Map control uses Internet Explorer's ActiveX on the client computer. To use the Map control in the application, the client computer must have Internet Explorer 10 or 11.
Map control and Google license
Caution: Google license
You must specify a license key to use the maps service.
A Google Developer account is required to get a Google Maps API key. Refer to the Google license to learn more about the terms of service (free or paid service, usage quota, etc.).
When the developer account is available, you must:
- Generate the key in the Google developer console (https://console.developers.google.com). The operations to perform are as follows (valid at the date this page was written):
- Use a Google account to connect to the developer console.
- Create a project if necessary.
- Click "Enable APIs and services".
- Click "Credentials". Then, click the link "Credentials in APIs & Services".
- Click "Create credentials".
- Select "API key".
- Validate the key creation and copy the key created by Google.
- Specify the key used in the application or in the site with MapLicenseGgl.
Unit examples (WEBDEV): The Map control
Unit examples (WINDEV): The Map control
Unit examples (WINDEV): The GglGetStaticMap function
Cross-platform examples (WINDEV Mobile): WM Geolocation
Cross-platform examples (WINDEV Mobile): WM Sports
This page is also available for…