Skip To Content ArcGIS for Developers Sign In Dashboard

Grid Class

(Esri::ArcGISRuntime::Grid)

Represents options to display a grid on top of a map. More...

Header: #include <Grid>
Since: Esri::ArcGISRuntime 100.0
Inherits: Object
Inherited By:

Esri::ArcGISRuntime::LatitudeLongitudeGrid, Esri::ArcGISRuntime::MGRSGrid, Esri::ArcGISRuntime::USNGGrid, and Esri::ArcGISRuntime::UTMGrid

Public Functions

~Grid()
GridType gridType() const
bool isLabelsVisible() const
bool isVisible() const
double labelOffset() const
GridLabelPosition labelPosition() const
int levelCount() const
Symbol *lineSymbol(int level) const
void setLabelOffset(double labelOffset)
void setLabelPosition(GridLabelPosition labelPosition)
void setLabelsVisible(bool labelsVisible)
void setLineSymbol(int level, Symbol *lineSymbol)
void setTextSymbol(int level, Symbol *textSymbol)
void setVisible(bool visible)
Symbol *textSymbol(int level) const
  • 31 public functions inherited from QObject

Additional Inherited Members

Detailed Description

Represents options to display a grid on top of a map.

Supported grid types are:

This class allows customization of the grid by setting:

  • Whether to show the grid
  • Whether to show labels
  • Label offsets
  • Label position

Each grid has a number of resolution levels. Each level is displayed at a predetermined scale range that you cannot change. For each level of the grid, you can specify the symbols used for text and lines. The number of levels may be determined by the levelCount property. Integers used specify a level increment starting from zero.

Member Function Documentation

Grid::~Grid()

Destructor.

GridType Grid::gridType() const

Returns the type of this grid.

bool Grid::isLabelsVisible() const

Returns whether any grid labels are visible.

bool Grid::isVisible() const

Returns whether the grid is visible.

double Grid::labelOffset() const

Returns the offset in device-independent pixels (DIPs) for all text labels from the edge of the map view.

See also setLabelOffset().

GridLabelPosition Grid::labelPosition() const

Returns the positioning option used for all text labels.

See also setLabelPosition().

int Grid::levelCount() const

Returns the number of levels of resolution supported by the grid.

Symbol *Grid::lineSymbol(int level) const

Returns the line symbol used for the grid lines at the given resolution level.

See also setLineSymbol().

void Grid::setLabelOffset(double labelOffset)

Sets the offset in device-independent pixels (DIPs) for all text labels from the edge of the map view to labelOffset.

See also labelOffset().

void Grid::setLabelPosition(GridLabelPosition labelPosition)

Sets the positioning option used for all text labels to labelPosition.

See also labelPosition().

void Grid::setLabelsVisible(bool labelsVisible)

Sets whether grid labels are visible to labelsVisible.

See also isLabelsVisible().

void Grid::setLineSymbol(int level, Symbol *lineSymbol)

Sets the line symbol used for the grid lines at the given resolution level to lineSymbol.

The symbol must be a SimpleLineSymbol.

See also lineSymbol().

void Grid::setTextSymbol(int level, Symbol *textSymbol)

Sets the text symbol used for the grid labels at the given resolution level to textSymbol.

See also textSymbol().

void Grid::setVisible(bool visible)

Sets whether the grid is visible to visible.

See also isVisible().

Symbol *Grid::textSymbol(int level) const

Returns the text symbol used for the grid labels at the given resolution level.

See also setTextSymbol().


Feedback on this topic?