ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Communication / Google functions / Managing Google Maps
  • Overview
  • How to?
  • Retrieving a map in your applications or in your sites
  • Retrieving a map with advanced setting (markets, ...)
  • Remark
  • Other services
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
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 mapping service offered 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 route can be retrieved by using a GPS device that saves the path.
  • Displaying markers on a map at a given position.
Warning: Before using a feature related to Google services, we strongly advise you to refer to the license agreement for that service.. Some restrictions may apply. The content of the 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 the service provider.
How to?

Retrieving a map in your applications or in your sites

To include a map that uses the Google Maps service in your applications or in your sites:
  1. Generate a Google key. This key is supplied by Google. For more details, see https://developers.google.com/maps/documentation/javascript/tutorial#api_key. Caution: the address of this page may have changed since this page was written.
  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 uses the Google Maps service in your applications or in your sites:
  1. Generate a Google key. This key is supplied by Google. For more details, see https://developers.google.com/maps/documentation/javascript/tutorial#api_key.
  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 variable of type gglMapParameter. This variable is used to define all the characteristics of the map: presence of a frame, display of a path, format of the image received, markers, etc. Specify only the desired characteristics.
    • Assign the result of GglGetStaticMap to the Image control. In <Advanced Parameters>, specify the name of the gglMapParameter variable containing the requested options.
Note If you exceed the limits set by Google (number of points in a path, number of markers, image size, etc.), no image is returned. In this case, we advise you to modify the parameters of the map by reducing the number of elements to display.
WINDEVWindows

Remark

If you use a proxy to access Internet, the proxy must be configured (Proxy) to use Google functions.
Other services
WINDEVWindows The Google Maps service can also be used to get 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 version required
  • Version 14
This page is also available for…
Comments
Errors that may occur in Maps not working:
A) in the Google developer environment, a valid credit/debit card must be registered in the billing method of payment. If you do not have a card that has valid usage data, it may also give an error.
B) environment changes may be necessary to create new api key.
C) the api is not ok, because for the maps it has a
Different web and mobile apis, minus watching an updated tutorial.
Boller
30 Aug. 2023
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
02 Jan. 2018

Last update: 03/27/2025

Send a report | Local help