Grid Class

  • Grid
  • class Esri::ArcGISRuntime::Grid

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

    This class was introduced in Esri::ArcGISRuntime 100.0.

    Public Functions

    virtual ~Grid() override
    Esri::ArcGISRuntime::GridType gridType() const
    bool isLabelsVisible() const
    bool isVisible() const
    double labelOffset() const
    Esri::ArcGISRuntime::GridLabelPosition labelPosition() const
    int levelCount() const
    Esri::ArcGISRuntime::Symbol *lineSymbol(int level) const
    void setLabelOffset(double labelOffset)
    void setLabelPosition(Esri::ArcGISRuntime::GridLabelPosition labelPosition)
    void setLabelsVisible(bool labelsVisible)
    void setLineSymbol(int level, Esri::ArcGISRuntime::Symbol *lineSymbol)
    void setTextSymbol(int level, Esri::ArcGISRuntime::Symbol *textSymbol)
    void setVisible(bool visible)
    Esri::ArcGISRuntime::Symbol *textSymbol(int level) const

    Detailed Description

    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

    [override virtual] Grid::~Grid()

    Destructor.

    Esri::ArcGISRuntime::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().

    Esri::ArcGISRuntime::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.

    Esri::ArcGISRuntime::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(Esri::ArcGISRuntime::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, Esri::ArcGISRuntime::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, Esri::ArcGISRuntime::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().

    Esri::ArcGISRuntime::Symbol *Grid::textSymbol(int level) const

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

    See also setTextSymbol().

    Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.