PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
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
Indicates the "Google Maps API" license key that will be used in the Map controls (of WINDEV or WEBDEV). This key may be required to use the "Google Maps API for work" features. See the license of "Google Maps API" for more details.
WEBDEV - Server codePHP You also have the ability to enter the "Google Maps API" license in the description window of project ("Advanced" tab).
WEBDEV - Server codePHP You also have the ability to enter the "Google Maps API" license in the description window of project ("Project" tab).
WINDEViPhone/iPad Important: The call to MapLicenseGgl must be performed before opening the window containing the Map control. If the Map control is found in the first project window, the call to MapLicenseGgl must be performed in the initialization code of project.
Versions 22 and later
iPhone/iPad In test mode, the Map control is using the Map control of WINDEV. This function is used to specify (if necessary) the "Google Maps API" license key in order for the Map control to be displayed properly during a GO on the development computer.
New in version 22
iPhone/iPad In test mode, the Map control is using the Map control of WINDEV. This function is used to specify (if necessary) the "Google Maps API" license key in order for the Map control to be displayed properly during a GO on the development computer.
iPhone/iPad In test mode, the Map control is using the Map control of WINDEV. This function is used to specify (if necessary) the "Google Maps API" license key in order for the Map control to be displayed properly during a GO on the development computer.
PHP This function is available for the PHP sites from version 200051.
Versions 22 and later
iPhone/iPad This function is now available for the iPhone/iPad applications.
New in version 22
iPhone/iPad This function is now available for the iPhone/iPad applications.
iPhone/iPad This function is now available for the iPhone/iPad applications.
Example
// Initialize the Google key
MapLicenseGgl("ABCDEF12345789abcdef")
Syntax
MapLicenseGgl(<Google Key>)
<Google Key>: Character string (with quotes)
Key supplied by Google.
Remarks
  • The use of Map control is subject to specific terms and conditions. Check the Google license regarding the use of mapping services.

    Caution: 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 Google 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".
      • 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.
  • This function allows you to specify the license to use in order for the provider of Google Maps to give the application:
    • from June 22 2016, access to the "Google Maps JavaScript API" features.
    • access to the extended features of "Maps API for work" (greater number of queries, monitoring, quota, ...).
  • The license is applied to all the maps of the application and it will be used for all the new Map controls created after this call. We advise you to call this function in the initialization code of project.
  • This function must be used for the WINDEV and WEBDEV applications only. A different mechanism is used in the Mobile applications (Android or iOS).
Components
WINDEVReports and Queries wd230obj.dll
WEBDEV - Server code wd230page.dll
Linux wd230obj.so
Minimum required version
  • Version 20
This page is also available for…
Comments
Rota & Distancia
PROCEDURE glo_rot_distancia(origem,destino)

arquivo is string=gsdirtemp+DateSys()+TimeSys()+".xml"

HTTPAddParameter("GoogleMaps","key","AIzaSyDbSVKYPwB1a-_vPbDzAr6LgAfIj4iW2hc")//CHAVE GOOGLE

HTTPDestination(arquivo)

IF NOT HttpRequest(StringBuild("http://maps.googleapis.com/maps/api/distancematrix/xml?origins=%1&destinations=%2&mode=driving&language=pt-BR&sensor=false",Replace(origem," ","%20"),Replace(destino," ","%20"))) THEN

RESULT(0)

END

sArqxml is string=fLoadText(arquivo)

//fDelete(arquivo)

IF NOT XmlDocument("XML",sArqxml) THEN

RESULT(0)

END

RESULT(XMLRead("XML","/DistanceMatrixResponse/row/element/distance/text"))
BOLLER
Nov. 11 2017