GeocodeResult Class

LocatorTask geocode or reverse geocode operation."> GeocodeResult Class | ArcGISQtCpp
  • GeocodeResult
  • class Esri::ArcGISRuntime::GeocodeResult

    A match candidate returned from a LocatorTask geocode or reverse geocode operation. More...

    Header: #include <GeocodeResult.h>
    Since: Esri::ArcGISRuntime 100.0

    Public Functions

    GeocodeResult(const Esri::ArcGISRuntime::GeocodeResult &other)
    GeocodeResult(Esri::ArcGISRuntime::GeocodeResult &&other)
    QVariantMap attributes() const
    Esri::ArcGISRuntime::Point displayLocation() const
    Esri::ArcGISRuntime::Envelope extent() const
    Esri::ArcGISRuntime::Point inputLocation() const
    bool isEmpty() const
    QString label() const
    Esri::ArcGISRuntime::Point routeLocation() const
    double score() const
    Esri::ArcGISRuntime::GeocodeResult &operator=(const Esri::ArcGISRuntime::GeocodeResult &other)
    Esri::ArcGISRuntime::GeocodeResult &operator=(Esri::ArcGISRuntime::GeocodeResult &&other)

    Detailed Description

    GeocodeResult provides information about the candidate, such as a collection of requested attribute values, user-friendly label text, and locations suited for accurate match display or for routing input.

    Geocoding takes an address or place name, and converts it into real-world coordinates. Reverse geocoding does the opposite, and converts real-world coordinates into an address or place name. These operations are available on the LocatorTask class. Obtain this result from the LocatorTask::geocodeCompleted signal.

    Member Function Documentation


    Default constructor.

    GeocodeResult::GeocodeResult(const Esri::ArcGISRuntime::GeocodeResult &other)

    Copy constructor from other GeocodeResult.

    GeocodeResult::GeocodeResult(Esri::ArcGISRuntime::GeocodeResult &&other)

    Move constructor from other GeocodeResult.



    QVariantMap GeocodeResult::attributes() const

    Returns the attributes of the GeocodeResult.

    A collection of attributes as requested by GeocodeParameters::resultAttributeNames or ReverseGeocodeParameters::resultAttributeNames.

    Available attributes depend on the data stored with the locator, and can include things such as place name, URL, phone number, and so on. These attributes can be defined in GeocodeParameters::setResultAttributeNames.

    Esri::ArcGISRuntime::Point GeocodeResult::displayLocation() const

    Returns the display location of the GeocodeResult.

    For example, if searching for a park, the returned point would be near the center of the park.

    Esri::ArcGISRuntime::Envelope GeocodeResult::extent() const

    Returns the extent of the GeocodeResult.

    The extent can be used for zooming the map to display the candidate result.

    Esri::ArcGISRuntime::Point GeocodeResult::inputLocation() const

    Returns the Point provided as input to LocatorTask::reverseGeocodeAsync(const Esri::ArcGISRuntime::Point&).

    Only applicable for results of reverse-geocode operations.

    bool GeocodeResult::isEmpty() const

    Returns whether this GeocodeResult is empty.

    QString GeocodeResult::label() const

    Returns the label of the GeocodeResult.

    Esri::ArcGISRuntime::Point GeocodeResult::routeLocation() const

    The nearest street location of the GeocodeResult.

    Use this location if you want to use the candidate as a stop in a route. For example, GeocodeResult::displayLocation may provide a more precise rooftop location of a house, whereas GeocodeResult::routeLocation will provide the nearest street location.

    double GeocodeResult::score() const

    Returns the score of the GeocodeResult.

    A value that indicates how well the address was matched. The score is in a range between 0 (no match) and 100 (perfect match).

    See also GeocodeParameters::minScore.

    Esri::ArcGISRuntime::GeocodeResult &GeocodeResult::operator=(const Esri::ArcGISRuntime::GeocodeResult &other)

    Assignment operator from other GeocodeResult.

    Esri::ArcGISRuntime::GeocodeResult &GeocodeResult::operator=(Esri::ArcGISRuntime::GeocodeResult &&other)

    Move operator from other GeocodeResult.

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