import VisibleElements from "@arcgis/core/widgets/support/GridControls/VisibleElements.js";const VisibleElements = await $arcgis.import("@arcgis/core/widgets/support/GridControls/VisibleElements.js");- Inheritance:
- VisibleElements→
Accessor
- Since
- ArcGIS Maps SDK for JavaScript 5.0
The visible elements that are displayed within the widget. This provides the ability to toggle visibility for individual elements within the widget.
Example
// This removes the `dynamicScaleToggle` and `gridEnabledToggle`gridControls.visibleElements = { dynamicScaleToggle: false, gridEnabledToggle: false}Constructors
Constructor
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| properties | | |
Properties
colorSelection
- Type
- boolean
Indicates whether to display the buttons to change the color of the grid. Default is true. This controls the GridControlsViewModel.gridColor.
- Default value
- true
dynamicScaleToggle
- Type
- boolean
Indicates whether to display the dynamicScaleToggle. Default is true. This toggles
the GridControlsViewModel.dynamicScaling property.
- Default value
- true
gridEnabledToggle
- Type
- boolean
Indicates whether to display the gridEnabledToggle. Default is true. This enables / disables the grid.
- Default value
- true
gridSnapEnabledToggle
- Type
- boolean
Indicates whether to display the gridSnapEnabledToggle. This enables / disables snapping to the grid.
- Default value
- true
lineIntervalInput
- Type
- boolean
Indicates whether to display the lineIntervalInput. Default is true. This defines the GridControlsViewModel.majorLineInterval, which controls the number of grid lines between opaque grid lines.
- Default value
- true
numericInputs
- Type
- boolean
Indicates whether to display the numericInputs. Default is true. Defines the spacing in between grid lattices and the angle.
- Default value
- true
outOfScaleWarning
- Type
- boolean
Indicates whether to display a notice when the grid is not visible because it is out of scale and dynamic scaling is turned off. Default is true.
- Default value
- true
placementButtons
- Type
- boolean
Indicates whether to display placementButtons. Default is true. The buttons allow for placing, moving, and rotating the grid.
- Default value
- true
rotateWithMapToggle
- Type
- boolean
Indicates whether to display the rotateWithMapToggle. Default is true.
This toggles the GridControlsViewModel.rotateWithMap property.
When true, rotating the map also rotates the grid on screen.
- Default value
- true