PictureMarkerSymbolLayer Class

  • PictureMarkerSymbolLayer
  • class Esri::ArcGISRuntime::PictureMarkerSymbolLayer

    Represents a symbol layer used to place a picture marker on a point geometry. More...

    Header: #include <PictureMarkerSymbolLayer.h>
    Since: Esri::ArcGISRuntime 100.5
    Inherits: Esri::ArcGISRuntime::MarkerSymbolLayer, Esri::ArcGISRuntime::Loadable, and Esri::ArcGISRuntime::RemoteResource

    This class was introduced in Esri::ArcGISRuntime 100.5.

    Public Functions

    PictureMarkerSymbolLayer(const QUrl &url, Esri::ArcGISRuntime::Credential *credential, QObject *parent = nullptr)
    PictureMarkerSymbolLayer(const QUrl &url, QObject *parent = nullptr)
    PictureMarkerSymbolLayer(const QImage &image, QObject *parent = nullptr)
    virtual ~PictureMarkerSymbolLayer() override
    QImage image() const
    void setTintColor(const QColor &tintColor)
    QColor tintColor() const

    Reimplemented Public Functions

    virtual void cancelLoad() override
    virtual Esri::ArcGISRuntime::Credential *credential() const override
    virtual void load() override
    virtual Esri::ArcGISRuntime::Error loadError() const override
    virtual Esri::ArcGISRuntime::LoadStatus loadStatus() const override
    virtual Esri::ArcGISRuntime::RequestConfiguration requestConfiguration() const override
    virtual void retryLoad() override
    virtual void setRequestConfiguration(const Esri::ArcGISRuntime::RequestConfiguration &requestConfiguration) override
    virtual QUrl url() const override

    Signals

    void doneLoading(Esri::ArcGISRuntime::Error loadError)
    void loadStatusChanged(Esri::ArcGISRuntime::LoadStatus loadStatus)

    Detailed Description

    This symbol layer, in a MultilayerPointSymbol, places a picture marker at the location of the point feature. The class supports changing dimensions of the marker, specifying the image (or URL linking to the image) to use as the marker, as well as the general marker options provided by the MarkerSymbolLayer base class.

    Example:

    Create a PictureMarkerSymbolLayer and set its URL to an online PNG:

    const QUrl pictureMarkerSymbolLayerUrl("http://static.arcgis.com/images/Symbols/Basic/YellowStickpin.png");
    PictureMarkerSymbolLayer* pictureMarkerSymbolLayer = new PictureMarkerSymbolLayer(pictureMarkerSymbolLayerUrl, this);

    Member Function Documentation

    PictureMarkerSymbolLayer::PictureMarkerSymbolLayer(const QUrl &url, Esri::ArcGISRuntime::Credential *credential, QObject *parent = nullptr)

    Constructor to initialize a picture marker symbol with the provided url to an image, a credential for the secured resource, and optional parent.

    The URL can be provided as a path to a local file (file:/<path to file>), path to a resource image (qrc:/<path to resource image>), or a path to an HTTP URL image (http://path to image).

    A credential is specified if the image needs authentication to gain access to it.

    PictureMarkerSymbolLayer::PictureMarkerSymbolLayer(const QUrl &url, QObject *parent = nullptr)

    Constructor to initialize a picture marker symbol with the provided url to an image and optional parent.

    The URL can be provided as a path to a local file ( "file:/<path to file>"), path to a resource image ("qrc:/<path to resource image>"), or a path to an HTTP URL image ("http://path to image").

    PictureMarkerSymbolLayer::PictureMarkerSymbolLayer(const QImage &image, QObject *parent = nullptr)

    Constructor to initialize a picture marker symbol with the provided image and optional parent.

    [signal] void PictureMarkerSymbolLayer::doneLoading(Esri::ArcGISRuntime::Error loadError)

    Signal emitted when this object is done loading.

    • loadError - Details about any error that may have occurred.

    Note: If there is a load error it will also be emitted on the errorOccurred signal.

    See also Loadable and Object.

    [signal] void PictureMarkerSymbolLayer::loadStatusChanged(Esri::ArcGISRuntime::LoadStatus loadStatus)

    Signal emitted when the load status changes for this object.

    See also Loadable.

    [override virtual] PictureMarkerSymbolLayer::~PictureMarkerSymbolLayer()

    Destructor.

    [override virtual] void PictureMarkerSymbolLayer::cancelLoad()

    Reimplements: Loadable::cancelLoad().

    See Loadable.

    [override virtual] Esri::ArcGISRuntime::Credential *PictureMarkerSymbolLayer::credential() const

    Reimplements: RemoteResource::credential() const.

    Returns the credential to be used to access a secured image URL if provided.

    QImage PictureMarkerSymbolLayer::image() const

    Returns the picture marker symbol image once loaded.

    If a URL was provided for the picture marker symbol, an attempt to load the symbol must occur and succeed, and then the image can be returned from this function. Prior to loading in this case, this will return a null QImage.

    Returned images are in the QImage::Format_ARGB32_Premultiplied format.

    [override virtual] void PictureMarkerSymbolLayer::load()

    Reimplements: Loadable::load().

    See Loadable.

    [override virtual] Esri::ArcGISRuntime::Error PictureMarkerSymbolLayer::loadError() const

    Reimplements: Loadable::loadError() const.

    See Loadable.

    [override virtual] Esri::ArcGISRuntime::LoadStatus PictureMarkerSymbolLayer::loadStatus() const

    Reimplements: Loadable::loadStatus() const.

    See Loadable.

    [override virtual] Esri::ArcGISRuntime::RequestConfiguration PictureMarkerSymbolLayer::requestConfiguration() const

    Reimplements: RemoteResource::requestConfiguration() const.

    Returns the RequestConfiguration in use by this symbol.

    See also setRequestConfiguration().

    [override virtual] void PictureMarkerSymbolLayer::retryLoad()

    Reimplements: Loadable::retryLoad().

    See Loadable.

    [override virtual] void PictureMarkerSymbolLayer::setRequestConfiguration(const Esri::ArcGISRuntime::RequestConfiguration &requestConfiguration)

    Reimplements: RemoteResource::setRequestConfiguration(const Esri::ArcGISRuntime::RequestConfiguration &requestConfiguration).

    Sets configuration parameters used for network requests sent by this symbol to requestConfiguration.

    See also requestConfiguration().

    void PictureMarkerSymbolLayer::setTintColor(const QColor &tintColor)

    Sets the tint color of the picture marker symbol layer with the specified tintColor.

    This function was introduced in Esri::ArcGISRuntime 100.6.

    See also tintColor().

    QColor PictureMarkerSymbolLayer::tintColor() const

    Returns the tint color of the picture marker symbol layer.

    The tint color is applied to the entire image by multiplying each RGB color channel in the image by the corresponding color channel of the tint color. The default color is white with 100% opacity (RGBA (255,255,255,255)), which when applied leaves the image with its native colors and unchanged opacity. A white tint color with opacity less than 100% applies the reduced opacity without changing the image colors.

    When getting the tint color from a symbol, the consensus value is reported. If there is no consensus (one or more layers have different tint colors), a null value is reported for the tint color. Likewise, setting a value for tint color on a symbol will apply that tint color to all layers the symbol contains.

    This function was introduced in Esri::ArcGISRuntime 100.6.

    See also setTintColor().

    [override virtual] QUrl PictureMarkerSymbolLayer::url() const

    Reimplements: RemoteResource::url() const.

    Returns the URL path to the picture marker symbol image.

    This could be a local file path, Qt resource path, or HTTP path to the image.

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