A class that contains the output results from a ClosestFacilityTask. More...
Header: | #include <ClosestFacilityResult.h> |
Since: | Esri::ArcGISRuntime 100.1 |
Public Functions
ClosestFacilityResult() | |
ClosestFacilityResult(const Esri::ArcGISRuntime::ClosestFacilityResult &other) | |
ClosestFacilityResult(Esri::ArcGISRuntime::ClosestFacilityResult &&other) | |
~ClosestFacilityResult() | |
QString | directionsLanguage() const |
QList<Esri::ArcGISRuntime::Facility> | facilities() const |
QList<double> | facilityCosts(const QString &attributeName, int facilityIndex) const |
QList<Esri::ArcGISRuntime::Incident> | incidents() const |
bool | isEmpty() const |
QStringList | messages() const |
QList<Esri::ArcGISRuntime::PointBarrier> | pointBarriers() const |
QList<Esri::ArcGISRuntime::PolygonBarrier> | polygonBarriers() const |
QList<Esri::ArcGISRuntime::PolylineBarrier> | polylineBarriers() const |
QList<int> | rankedFacilityIndexes(int incidentIndex) const |
Esri::ArcGISRuntime::ClosestFacilityRoute | route(int facilityIndex, int incidentIndex) const |
Esri::ArcGISRuntime::ClosestFacilityResult & | operator=(const Esri::ArcGISRuntime::ClosestFacilityResult &other) |
Esri::ArcGISRuntime::ClosestFacilityResult & | operator=(Esri::ArcGISRuntime::ClosestFacilityResult &&other) |
Detailed Description
The closest facility result contains all necessary output from a successfully- completed ClosestFacilityTask::solveClosestFacilityAsync(const Esri::ArcGISRuntime::ClosestFacilityParameters&). This includes collection of routes, barriers and messages.
{ClosestFacilityTask::solveClosestFacilityAsync(const Esri::ArcGISRuntime::ClosestFacilityParameters&)}
Relevant samples:
- Find closest facility to an incident (interactive): Find a route to the closest facility from a location.
- Find closest facility to multiple incidents (service): Find routes from several locations to the respective closest facility.
See also ClosestFacilityTask and Esri::ArcGISRuntime::ClosestFacilityTask::solveClosestFacilityAsync(const Esri::ArcGISRuntime::ClosestFacilityParameters&).
Member Function Documentation
ClosestFacilityResult::ClosestFacilityResult ()
Default constructor.
Warning: This is for convenience only and will construct an empty object.
ClosestFacilityResult::ClosestFacilityResult (const Esri::ArcGISRuntime::ClosestFacilityResult &other)
Copy constructor from other ClosestFacilityResult.
ClosestFacilityResult::ClosestFacilityResult (Esri::ArcGISRuntime::ClosestFacilityResult &&other)
Move constructor from other ClosestFacilityResult.
ClosestFacilityResult::~ClosestFacilityResult ()
Destructor.
QString ClosestFacilityResult::directionsLanguage () const
Returns directions language.
The language used to generate driving directions text instructions.
QList<Esri::ArcGISRuntime::Facility > ClosestFacilityResult::facilities() const
Returns a list of the facilities used in the ClosestFacilityTask.
QList<double> ClosestFacilityResult::facilityCosts (const QString &attributeName , int facilityIndex ) const
Returns total cost value for given attributeName and facilityIndex.
QList<Esri::ArcGISRuntime::Incident > ClosestFacilityResult::incidents() const
Returns a list of the incidents used in the ClosestFacilityTask.
bool ClosestFacilityResult::isEmpty () const
Returns true
if this ClosestFacilityResult is empty.
QStringList ClosestFacilityResult::messages() const
Returns a list of messages about the ClosestFacilityResult.
Messages received when solve is completed. If a route cannot be solved, the message returned by the server identifies the route that could not be solved.
QList<Esri::ArcGISRuntime::PointBarrier > ClosestFacilityResult::pointBarriers () const
Returns a list of the point barriers used in the ClosestFacilityTask.
Barriers are only returned if the returnPointBarriers property of ClosestFacilityParameters is true
.
See also ClosestFacilityParameters.
QList<Esri::ArcGISRuntime::PolygonBarrier > ClosestFacilityResult::polygonBarriers () const
Returns a list of the polygon barriers used in the ClosestFacilityTask.
Barriers are only returned if the returnPolygonBarriers property of ClosestFacilityParameters is true
.
See also ClosestFacilityParameters.
QList<Esri::ArcGISRuntime::PolylineBarrier > ClosestFacilityResult::polylineBarriers () const
Returns a list of the polyline barriers used in the ClosestFacilityTask.
Barriers are only returned if the returnPolylineBarriers property of ClosestFacilityParameters is true
.
See also ClosestFacilityParameters.
QList<int> ClosestFacilityResult::rankedFacilityIndexes (int incidentIndex ) const
Returns an ordered list of facility indexes for a given incidentIndex.
- incidentIndex - The index of facility.
Returns facility indexes for a given incident where the index is a rank level and the value is a facility index. The first element in the list is the index of the closest facility, the second element is the next closest, etc. Multiple properties can effect the number of facilities returned for each incident:
Esri::ArcGISRuntime::ClosestFacilityRoute ClosestFacilityResult::route(int facilityIndex , int incidentIndex ) const
Returns a route between the specified facility and incident.
- facilityIndex - The index of facility.
- incidentIndex - The index of incident.
Esri::ArcGISRuntime::ClosestFacilityResult &ClosestFacilityResult::operator=(const Esri::ArcGISRuntime::ClosestFacilityResult &other)
Assignment operator from other ClosestFacilityResult.
Esri::ArcGISRuntime::ClosestFacilityResult &ClosestFacilityResult::operator=(Esri::ArcGISRuntime::ClosestFacilityResult &&other)
Move operator from other ClosestFacilityResult.