PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
This content comes from an automatic translation.
  • Overview of Map control
  • Creating a Map control
  • Displaying and handling maps
  • Displaying the maps
  • Maps handled by the user
  • Specific features
  • Internet Explorer: Required versions
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Overview of Map control
Versions 20 and later
WINDEVWindows The Map control is now available for WINDEV applications in Windows.
WindowsLinux The Map control is now available for WEBDEV sites in Windows and Linux.
New in version 20
WINDEVWindows The Map control is now available for WINDEV applications in Windows.
WindowsLinux The Map control is now available for WEBDEV sites in Windows and Linux.
WINDEVWindows The Map control is now available for WINDEV applications in Windows.
WindowsLinux The Map control is now available for WEBDEV sites in Windows and Linux.
Versions 21 and later
Universal Windows 10 App The Map control is now available in Universal Windows 10 App mode.
New in version 21
Universal Windows 10 App The Map control is now available in Universal Windows 10 App mode.
Universal Windows 10 App The Map control is now available in Universal Windows 10 App mode.
The Map control allows you to display a map in order to geolocate, display points of interest (POI) and more, ...
This map comes from:
  • Versions 20 and later
    WINDEV 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.
    New in version 20
    WINDEV 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.
    WINDEV 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.
  • Versions 21 and later
    Universal Windows 10 App the Bing Maps service for applications in Universal Windows 10 App mode.
    Caution:
    • 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 an address via an Address or a geoPosition variable.
    New in version 21
    Universal Windows 10 App the Bing Maps service for applications in Universal Windows 10 App mode.
    Caution:
    • 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 an address via an Address or a geoPosition variable.
    Universal Windows 10 App the Bing Maps service for applications in Universal Windows 10 App mode.
    Caution:
    • 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 an address via an Address or a geoPosition variable.
WINDEV Caution: Evolutions of Google license
Google Maps terms of service changed on June 22, 2016. From now on, a license key must necessarily be specified to use this service. You must:
  1. 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 "Maps JavaScript API".
    • Click "Enable" to enable the Google Maps JavaScript API.
    • 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.
  2. Specify the key used in the application or in the site with MapLicenseGgl.
Google Maps terms of service changed on June 11, 2018. The license key for using this service now requires a payment.
The map displayed is interactive: you have the ability to zoom, move, ... It can be displayed in map view or satellite view.

Creating a Map control

To create a Map control:
  1. On the "Creation" pane, in the "Graphic controls" group, click "Map".
  2. Click where the control will be created in the window or page.
To view the control characteristics, select "Description" in the popup menu of the control. The main options of the control can be defined in the "General" tab:
  • the display mode: map or satellite,
  • WINDEVUniversal Windows 10 App whether the zoom buttons must be displayed (or not) in the control,
  • Universal Windows 10 App scaling by double tap,
  • WINDEV scaling by double click,
  • WINDEVUniversal Windows 10 App remember the last position displayed.
  • the image used for the POI markers.
Remarks:
  • WINDEV The Map control cannot be used in automated tests.
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.
WINDEVUniversal Windows 10 App You can display the last position: simply check "Remember last position displayed" in the "General" tab of the Map control description window. In this case, the last position is displayed with the same zoom level.

Maps handled by the user

The user can move on the map:
  • Universal Windows 10 App by scrolling the map with one or more fingers.
  • WINDEV by scrolling the map using the mouse.
  • WINDEVUniversal Windows 10 App via the control positioning buttons (if the "Display the zoom buttons" option has been selected in the "General" tab of the control description window).
The user can zoom in or out:
  • Universal Windows 10 App by performing a "scale" or "pinch" gesture: spreading two fingers apart on the screen allows zooming in, and pinching them together allows zooming out.
  • WINDEVUniversal Windows 10 App by using the zoom buttons of the control (if the option has been selected in the "General" tab of the control description window).
  • Universal Windows 10 App by double-tapping the map to zoom in one level on a position (if this option has been checked in the "General" tab of the control description window).
  • WINDEV by double-clicking the map to zoom one level on a position (if this option has been checked in the "General" tab of the control description window).
  • by programming with ..Zoom.
WINDEV To find out all the operations available at runtime, see Map control: Automatic Application Features (AAF).
Specific features
WINDEV

Internet Explorer: Required versions

WINDEV 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.
Related Examples:
The Map control Unit examples (WEBDEV): The Map control
[ + ] This example explains how to use the Map control of WEBDEV.
It can be used to display a map that includes markers as well as an itinerary.
The Map control Unit examples (WINDEV): The Map control
[ + ] Using the Map control of WINDEV.
It is used to display a map that includes markers as well as an itinerary.
The GglGetStaticMap function Unit examples (WINDEV): The GglGetStaticMap function
[ + ] Using gglGetMap to display a Google map in an Image control.
WM Geolocation Cross-platform examples (WINDEV Mobile): WM Geolocation
[ + ] This example explains how to perform proximity searches with geolocation :
- search around me
- search in a city, at a given address, or close to a specific address.
The results are displayed in a looper and in a map with markers.
WM Sports Cross-platform examples (WINDEV Mobile): WM Sports
[ + ] This example is a sport application used to save your performances.
The application calculates the distance, the time, the average speed and the number of calories spent according to the sport.
The run is displayed on a map control via markers and an itinerary.

The example also includes a server part used to synchronize the user data.
This webservice is available in the WEBDEV "WW_Sports" example.
Minimum version required
  • Version 17
This page is also available for…
Comments
Example
MapLicenseGgl("AIzaSyDbSVKYPwB1a-_vPbDzAr6LgAfIj4iW2hc")

PositionWx is geoPosition
PositionWx.Latitude = -25.4401779
PositionWx.Longitude = -49.2118695

MarkerWx is Marker
MarkerWx.Description = "WX INFORMATICA"
MarkerWx.Name = "WX INFORMATICA"
MarkerWx.Position = PositionWx

MapAddMarker(GoogleMaps,MarkerWx)

GoogleMaps.DisplayPosition(PositionWx)
GoogleMaps..Zoom = 18
BOLLER
13 Jul. 2018
Example Webdev
MapLicenseGgl("AIzaSyDbSVKYPwB1a-_vPbDzAr6LgAfIj4iW2hc")

PositionWx is geoPosition
PositionWx.Latitude = -25.4401779
PositionWx.Longitude = -49.2118695

MarkerWx is Marker
MarkerWx.Description = "WX INFORMATICA"
MarkerWx.Name = "WX INFORMATICA"
MarkerWx.Position = PositionWx

MapAddMarker(GoogleMaps,MarkerWx)

GoogleMaps.DisplayPosition(PositionWx)
GoogleMaps..Zoom = 18
BOLLER
13 Jul. 2018