PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Changes the style of the map displayed in the Map control.
Example
// Apply "Aubergine" style to the map
MAP_MyMap.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:
  • 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: 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: wd280obj.dll
Minimum version required
  • Version 26
This page is also available for…
Comments
Click [Add] to post a comment