StyleControlOptions interface
The options for a StyleControl object.
- Extends
Properties
auto |
Whether to let style control automatically set the style, once user select a map style.
If set to |
layout | The layout to display the styles in. |
map |
The map styles to show in the control.
Style names are case sensitive.
If an included style isn't supported by the map it will be ignored.
Available styles can be found in the
supported styles article.
If "all" is specified, all map styles will be shown.
Default |
style | The style of the control.
Default |
Property Details
autoSelectionMode
Whether to let style control automatically set the style, once user select a map style.
If set to false
, then clicking on style will not set the set the style automatically.
Default true
autoSelectionMode?: boolean
Property Value
boolean
layout
The layout to display the styles in.
"icons"
: A row of clickable icons for each style.
"list"
: A scrollable list with the icons and names for each style.
Default "icons"
layout?: "icons" | "list"
Property Value
"icons" | "list"
mapStyles
The map styles to show in the control.
Style names are case sensitive.
If an included style isn't supported by the map it will be ignored.
Available styles can be found in the
supported styles article.
If "all" is specified, all map styles will be shown.
Default ["road", "grayscale_light", "grayscale_dark", "night", "road_shaded_relief"]
mapStyles?: string[] | "all"
Property Value
string[] | "all"
style
The style of the control.
Default ControlStyle.light
.
style?: ControlStyle