PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • 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
Windows The Map control is now available for the WINDEV applications in Windows.
WEBDEV - Server codeWindowsLinux The Map control is now available for the WEBDEV sites in Windows and Linux.
PHP The Map control is now available for the WEBDEV sites in PHP.
New in version 20
Windows The Map control is now available for the WINDEV applications in Windows.
WEBDEV - Server codeWindowsLinux The Map control is now available for the WEBDEV sites in Windows and Linux.
PHP The Map control is now available for the WEBDEV sites in PHP.
Windows The Map control is now available for the WINDEV applications in Windows.
WEBDEV - Server codeWindowsLinux The Map control is now available for the WEBDEV sites in Windows and Linux.
PHP The Map control is now available for the WEBDEV sites in PHP.
The Map control is used to display a map in order to find a location, to display points of interest (P.O.I.), ...
This map comes from:
  • Versions 20 and later
    WEBDEV - Server codePHP of Google Map service for the Web sites via Google Maps API.
    The use of 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
    WEBDEV - Server codePHP of Google Map service for the Web sites via Google Maps API.
    The use of 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.
    WEBDEV - Server codePHP of Google Map service for the Web sites via Google Maps API.
    The use of 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.
WEBDEV - Server codePHP Caution: Evolutions of Google license
From June 22 2016, the conditions for using the Google mapping services have evolved. 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.
    • Access the "API manager" of the project.
    • In the "Google Maps API" item, click the "Google Maps JavaScript API" link.
    • Click "Enable" to enable the Google Maps Javascript API.
    • In the "Identifiers" item, expand the "Create identifiers" button.
    • Select "API key".
      • For a WEBDEV site, select "Browser key". We advise you to specify the domain that will be using the key to monitor the queries and to avoid any usurpation.
      • For a WINDEV application, select "Server key". We advise you to specify the address that will be using the key to monitor the queries and to avoid any usurpation.
    • 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.
From June 11 2018, the conditions for using the Google mapping services have evolved. The license key for using this service now requires a payment.
The map displayed is interactive: you have the ability to zoom, to move, ... It can be displayed in street map view or in satellite view.

Creating a Map control

To create a Map control:
  1. In the window editor, click (or select "Insert .. Control .. Map control").On the "Creation" pane, in the "Graphic controls" group, click "Map".
  2. Click the position where the control will be created in the window or page.
To display the control characteristics, select "Description" from the popup menu of control. The "General" tab is used to define the main options of control:
  • the display mode: map or satellite,
  • WEBDEV - Server codePHP whether the zoom buttons must be displayed (or not) in the control,
  • the image used for the POI markers.
Notes:
    Displaying and handling maps

    Displaying the maps

    When the window containing a Map control is opened, a map of the world is automatically displayed: the map is centered around the equator, with the lowest zoom level. When the window containing a Map control is opened, a map of the world is automatically displayed: the map is centered on Europe, with medium zoom level.

    Maps handled by the user

    The user can move on the map:
    • WEBDEV - Server codePHP by scrolling the map using the mouse.
    • WEBDEV - Server codePHP via the control positioning buttons (if the "Display the zoom buttons" option was selected in the "General" tab of the description window of control).
    The zoom used for the display can be modified:
    • WEBDEV - Server codePHP by using the zoom buttons of the control (if the option was selected in the "General" tab of the description window of control).
    • by programming with ..Zoom.
    WEBDEV - Server codePHP To find out all the operations available at run time, see Map control: Automatic Application Features (AAF).
    Specific features
    WEBDEV - Server code

    Internet Explorer: Required versions

    WEBDEV - Server code To view a Map control in a WEBDEV site, the Web user must use:
    • Internet Explorer 10 or 11.
    • Another browser (Chrome, Firefox, ...).
    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 Geo-localization Cross-platform examples (WINDEV Mobile): WM Geo-localization
    [ + ] This example explains how to perform proximity searches with geolocalization:
    - 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 required version
    • Version 17
    This page is also available for…
    Comments
    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
    Jul. 13 2018
    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
    Jul. 13 2018