|
|
|
|
<Map>.ChangeStyle (Function) In french: <Carte>.ChangeStyle Changes the style of the map displayed in the Map control. // 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. | mcsAutomatic | The 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. | mcsCustom | Custom 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:
|
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
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|