QGIS API Documentation
3.41.0-Master (45a0abf3bec)
Loading...
Searching...
No Matches
src
core
geocoding
qgsgooglemapsgeocoder.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgsgooglemapsgeocoder.h
3
---------------
4
Date : November 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
#ifndef QGSGOOGLEMAPSGEOCODER_H
17
#define QGSGOOGLEMAPSGEOCODER_H
18
19
#include "qgis_core.h"
20
#include "
qgsgeocoder.h
"
21
22
#include <QMutex>
23
40
class
CORE_EXPORT
QgsGoogleMapsGeocoder
:
public
QgsGeocoderInterface
41
{
42
43
public
:
44
55
QgsGoogleMapsGeocoder
(
const
QString &apiKey,
const
QString ®ionBias = QString() );
56
57
Flags
flags
()
const override
;
58
QgsFields
appendedFields
()
const override
;
59
Qgis::WkbType
wkbType
()
const override
;
60
QList< QgsGeocoderResult >
geocodeString
(
const
QString &
string
,
const
QgsGeocoderContext
&context,
QgsFeedback
*feedback =
nullptr
)
const override
;
61
65
QUrl requestUrl(
const
QString &address,
const
QgsRectangle
&bounds =
QgsRectangle
() )
const
;
66
70
QgsGeocoderResult
jsonToResult(
const
QVariantMap &json )
const
;
71
75
void
setEndpoint(
const
QString &endpoint );
76
82
QString apiKey()
const
;
83
91
void
setApiKey(
const
QString &key );
92
98
QString region()
const
;
99
108
void
setRegion(
const
QString ®ion );
109
110
private
:
111
112
QString mApiKey;
113
QString mRegion;
114
QString mEndpoint;
115
116
static
QReadWriteLock sMutex;
117
118
};
119
120
#endif
// QGSGOOGLEMAPSGEOCODER_H
Qgis::WkbType
WkbType
The WKB type describes the number of dimensions a geometry has.
Definition
qgis.h:256
QgsFeedback
Base class for feedback objects to be used for cancellation of something running in a worker thread.
Definition
qgsfeedback.h:44
QgsFields
Container of fields for a vector layer.
Definition
qgsfields.h:46
QgsGeocoderContext
Encapsulates the context of a geocoding operation.
Definition
qgsgeocodercontext.h:32
QgsGeocoderInterface
Interface for geocoders.
Definition
qgsgeocoder.h:37
QgsGeocoderInterface::flags
virtual Flags flags() const =0
Returns the geocoder's capability flags.
QgsGeocoderInterface::wkbType
virtual Qgis::WkbType wkbType() const
Returns the WKB type of geometries returned by the geocoder.
Definition
qgsgeocoder.cpp:27
QgsGeocoderInterface::geocodeString
virtual QList< QgsGeocoderResult > geocodeString(const QString &string, const QgsGeocoderContext &context, QgsFeedback *feedback=nullptr) const
Geocodes a string.
Definition
qgsgeocoder.cpp:29
QgsGeocoderInterface::appendedFields
virtual QgsFields appendedFields() const
Returns a set of newly created fields which will be appended to existing features during the geocode ...
Definition
qgsgeocoder.cpp:25
QgsGeocoderInterface::Flags
QFlags< Flag > Flags
Definition
qgsgeocoder.h:47
QgsGeocoderResult
Represents a matching result from a geocoder search.
Definition
qgsgeocoderresult.h:41
QgsGoogleMapsGeocoder
A geocoder which uses the Google Map geocoding API to retrieve results.
Definition
qgsgooglemapsgeocoder.h:41
QgsRectangle
A rectangle specified with double values.
Definition
qgsrectangle.h:42
qgsgeocoder.h
Generated on Tue Nov 19 2024 18:20:01 for QGIS API Documentation by
1.9.8