ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Controls, pages and windows / Map functions
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Warning
WINDEVWEBDEV - Browser code As of version 2025 Update 2, this function is no longer available. Google has implemented a new map style management mode. It is now necessary to define map styles in the Google platform and then use the <Map>.IDGgl function to manage map styles.
Changes the style of the map displayed in the Map control.
New in SaaS
Android This function is only available if the card style has not been customized. Otherwise, this function has no effect.
Note: This feature is only available from WINDEV Suite SaaS 2025 - Update 3.
For more details, see Using new features exclusive to WINDEV Suite SaaS 2025.
Example
// Applique un style "Aubergine" à la carte
CARTE_MaCarte.ChangeStyle(mcsAubergine)
Syntax
<Result> = <Map control>.ChangeStyle(<Style> [, <Configuration file path>])
<Result>: Boolean
  • True if the new style could be applied,
  • False otherwise. To get more details on the error, use ErrorInfo.
<Map control>: Control name
Name of the Map control to be used.
<Style>: Integer
Modifies the style applied to the map displayed in the Map control. This parameter can take one of the following values:
mcsAubergine"Aubergine" style.
mcsAutomaticThe style will be applied according to the light or dark mode of the application:
  • Clear theme: the style used will be the "standard" style,
  • Dark theme: the style used will be "night".
If the theme of the application changes while the Map control is displayed, the style will change automatically.
mcsCustomCustom style. in this case, the <Configuration file path> must be specified.
mcsDark"Dark" style.
mcsNight"Night" style.
mcsRetro"Retro" style.
mcsSilver"Silver" style.
mcsStandard"standard" style.
<Configuration file path>: Optional character string
Path of the JSON file that describes the custom style to be applied to the map. This file must be a valid JSON file encoded in UTF-8. For more information on custom style configuration, see: https://mapstyle.withgoogle.com/
This parameter will be taken into account only if the <Style> parameter corresponds to the mcsCustom constant.
Remarks
  • By default, the Map control uses the automatic style.
  • To retrieve the style used by the map displayed in the Map control, use <Map>.GetStyle.
Related Examples:
WD Extended Map Training (WINDEV): WD Extended Map
[ + ] This example shows the different features of the Map control in desktop (Windows) and mobile (Android, iOS) devices
Business / UI classification: UI Code
Component: wd300obj.dll
Minimum version required
  • Version 26
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 06/18/2025

Send a report | Local help