PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
New WINDEV, WEBDEV and WINDEV Mobile 26 feature!
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
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 the details of the error, use ErrorInfo.
<Map control>: Control name
Name of Map control to use.
<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.
mcsSilver"Silver" 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.
mcsNight"Night" style.
mcsCustomCustom style. in this case, the <Configuration file path> must be specified.
mcsRetro"Retro" style.
mcsDark"Dark" 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: wd260obj.dll
Minimum version required
  • Version 26
This page is also available for…
Comments
Click [Add] to post a comment