Help / WLanguage / WLanguage functions / Controls, pages and windows / Map functions
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WindowsLinuxPHPWEBDEV - Browser code
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Stored procedures
Changes the style of the map displayed in the Map control.
// Apply "Aubergine" style to the map
<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:
  • Light theme: the "standard" style will be used,
  • Dark theme: the "night" style will be used.
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:
This parameter will be taken into account only if the <Style> parameter corresponds to the mcsCustom constant.
  • 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: wd280obj.dll
Minimum version required
  • Version 26
This page is also available for…
Click [Add] to post a comment

Last update: 06/26/2023

Send a report | Local help