Find an address

Loading

Code

#ifndef FIND_ADDRESS_H
#define FIND_ADDRESS_H

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

#include "GeocodeParameters.h"
#include <QQuickItem>

class FindAddress : public QQuickItem
{
  Q_OBJECT

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

  void componentComplete() Q_DECL_OVERRIDE;
  static void init();
  Q_INVOKABLE void geocodeAddress(const QString& address);
  Q_INVOKABLE void clearGraphics();

signals:
  void hideCallout();
  void showCallout(double x, double y, QString calloutText, QString calloutDetailedText);

private:
  void connectSignals();

private:
  Esri::ArcGISRuntime::Map* m_map = nullptr;
  Esri::ArcGISRuntime::MapQuickView* m_mapView = nullptr;
  Esri::ArcGISRuntime::GraphicsOverlay* m_graphicsOverlay = nullptr;
  Esri::ArcGISRuntime::LocatorTask* m_locatorTask = nullptr;
  Esri::ArcGISRuntime::GeocodeParameters m_geocodeParameters;
  Esri::ArcGISRuntime::Graphic* m_graphic = nullptr;
  int m_screenX = 0;
  int m_screenY = 0;
  QString m_calloutText;
  QString m_calloutDetailedText;
};

#endif // FIND_ADDRESS_H


In this topic
  1. Code