PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Overview
  • How to proceed?
  • Retrieving a map in your applications or in your sites
  • Retrieving a map with advanced setting (markets, ...)
  • Note
  • Other services
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
Using the Google Maps service
Overview
The Google Maps service is an Internet mapping software proposed by Google. It is used to display a map by proposing several viewing features.
Note: The cartography service proposed is Google Static Maps.
Examples of processes that can be performed in WLanguage:
  • Retrieving a map, displaying it in a window control or in a report control and sending it by email.
  • Defining the map area and the size of the image to retrieve by specifying the latitude, the longitude, the zoom factor, ...
  • Drawing an itinerary on the map (point by point): a path can be retrieved during a journey by a GPS that saves the itinerary.
  • Displaying markers on a map at a given position.
Warning: Before using a feature linked to Google services, we strongly recommend that you check the license for using this service. Some restrictions may apply. The content of licenses may change over time.
PC SOFT is in no case responsible for the way the native access functions are used. Make sure that you comply with the license of service provider.
How to proceed?

Retrieving a map in your applications or in your sites

To include a map that is using the Google Maps service in your applications or in your sites:
  1. Generate a Google key. This key is supplied by Google. See https://developers.google.com/maps/documentation/javascript/tutorial#api_key for more details. Caution: the address of this page may have been modified since the publication date of this page.
  2. Create an Image control in your WINDEV or WEBDEV project. This control will be used to display the requested map.
  3. In the code used to retrieve the map, assign the result of GglGetStaticMap to the Image control. This function expects the following parameters:
    • the Google key
    • the latitude and longitude of the central point of the map
    • the zoom performed
    • the size of image to retrieve. The maximum size is set to 640 x 640. This limit is defined by the Google Maps service at the date of publication of this page.
    • the type of requested map (road map, satellite, ...).
By default, this map has no border, it is in GIF format and it contains no marker. The language displayed on the map corresponds to the language of the country displayed.

Retrieving a map with advanced setting (markets, ...)

To include an advanced map that is using the Google Maps service in your applications or in your sites:
  1. Generate a Google key. This key is supplied by Google. See https://developers.google.com/maps/documentation/javascript/tutorial#api_key for more details.
  2. Create an Image control in your WINDEV or WEBDEV project. This control will be used to display the requested map.
  3. In the code used to retrieve the map:
    • Create a gglMapParameter variable. This variable will be used to define all the characteristics of the map: presence of a border, display of a path, format of the image received, markers, ... Specify the requested characteristics only.
    • Assign the result of GglGetStaticMap to the Image control. In <Advanced Parameters>, specify the name of the gglMapParameter variable containing the requested options.
Note: No image is returned if the limitations defined by Google are exceeded (number of points in a path, number of markers, size of the image, ...). In this case, we advise you to modify the parameters of the map by reducing the number of elements to display.
WINDEVWEBDEV - Server codeReports and QueriesWindowsWindows MobileAjaxUser code (UMC)

Note

If you are using a proxy to access Internet, the proxy must be configured (Proxy) to use the Google functions.
Other services
WINDEVWEBDEV - Server codeWindowsLinuxWindows Mobile The Google Maps service can also be used to retrieve the coordinates of an address. This feature can be used via GglAddressToCoordinates.
This function returns the latitude and longitude of the address specified in a gglCoordinate variable.
Related Examples:
The GglGetStaticMap function Unit examples (WINDEV): The GglGetStaticMap function
[ + ] Using gglGetMap to display a Google map in an Image control.
The GglGetStaticMap function Unit examples (WEBDEV): The GglGetStaticMap function
[ + ] Using GglGetStaticMap function to display a Google map in an Image control.
Minimum required version
  • Version 14
This page is also available for…
Comments
Advanced Google Maps API
The functions covered by WEBDEV for Google Maps API in the online manual appear to be relatively basic.

Do you have any examples/tutorials/guides on how to create/load/manipulate Google Map Polygons and other more advanced maps features?

I've written Google API stuff in Javascript, but invested in WEBDEV as I understood that this would allow me to control Google Maps advanced features directly without having to resort to Javascript.
RenardZorro
Jan. 02 2018