QGIS API Documentation 3.38.0-Grenoble (exported)
Loading...
Searching...
No Matches
qgsgeocoderresult.cpp
Go to the documentation of this file.
1/***************************************************************************
2 qgsgeocoderresult.cpp
3 ---------------
4 Date : August 2020
5 Copyright : (C) 2020 by Nyall Dawson
6 Email : nyall dot dawson at gmail dot com
7 ***************************************************************************
8 * *
9 * This program is free software; you can redistribute it and/or modify *
10 * it under the terms of the GNU General Public License as published by *
11 * the Free Software Foundation; either version 2 of the License, or *
12 * (at your option) any later version. *
13 * *
14 ***************************************************************************/
15
16#include "qgsgeocoderresult.h"
17
19{
20 QgsGeocoderResult result;
21 result.mIsValid = false;
22 result.mErrorString = errorMessage;
23 return result;
24}
25
26QgsGeocoderResult::QgsGeocoderResult( const QString &identifier, const QgsGeometry &geometry, const QgsCoordinateReferenceSystem &crs )
27 : mIsValid( true )
28 , mIdentifier( identifier )
29 , mGeometry( geometry )
30 , mCrs( crs )
31{}
32
34{
35 return mGroup;
36}
37
38void QgsGeocoderResult::setGroup( const QString &group )
39{
40 mGroup = group;
41}
42
44{
45 return mDescription;
46}
47
48void QgsGeocoderResult::setDescription( const QString &description )
49{
50 mDescription = description;
51}
This class represents a coordinate reference system (CRS).
Represents a matching result from a geocoder search.
QString description() const
Returns the optional description for the result.
QString group() const
Returns the optional group value for the result.
QgsGeocoderResult(const QString &identifier, const QgsGeometry &geometry, const QgsCoordinateReferenceSystem &crs)
Constructor for a valid QgsGeocoderResult, with the specified geometry and crs.
void setDescription(const QString &description)
Sets an optional description for the result.
void setGroup(const QString &group)
Sets the optional group value for the result.
static QgsGeocoderResult errorResult(const QString &errorMessage)
Creates an invalid error result, with the specified errorMessage string.
A geometry is the spatial representation of a feature.
const QgsCoordinateReferenceSystem & crs