ArcGIS Runtime SDK for Qt

Graphics overlay (dictionary renderer)

Loading

Code

#ifndef GraphicsOverlayDictionaryRenderer_H
#define GraphicsOverlayDictionaryRenderer_H

#include <QQuickItem>
#include <QXmlStreamReader>

#include "Envelope.h"

namespace Esri
{
    namespace ArcGISRuntime
    {
        class Map;
        class GraphicsOverlay;
        class MapQuickView;
    }
}

class GraphicsOverlayDictionaryRenderer : public QQuickItem
{
    Q_OBJECT

public:
    explicit GraphicsOverlayDictionaryRenderer(QQuickItem* parent = nullptr);
    ~GraphicsOverlayDictionaryRenderer();

    void componentComplete() Q_DECL_OVERRIDE;

signals:
    void graphicsLoaded();

public slots:
    void zoomToGraphics();

private:
    static const QString FIELD_CONTROL_POINTS;
    static const QString FIELD_WKID;

    void parseXmlFile();
    void createGraphic(QVariantMap rawAttributes);

    QString m_dataPath;
    QXmlStreamReader m_xmlParser;
    Esri::ArcGISRuntime::Map* m_map = nullptr;
    Esri::ArcGISRuntime::MapQuickView* m_mapView = nullptr;
    Esri::ArcGISRuntime::GraphicsOverlay* m_graphicsOverlay = nullptr;
    Esri::ArcGISRuntime::Envelope m_bbox;
};

#endif // GraphicsOverlayDictionaryRenderer_H


In this topic
  1. Code