-
Notifications
You must be signed in to change notification settings - Fork 59
/
qgeocodingmanagerenginegooglemaps.h
36 lines (28 loc) · 1.23 KB
/
qgeocodingmanagerenginegooglemaps.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#ifndef QGEOCODINGMANAGERENGINEGOOGLEMAPS_H
#define QGEOCODINGMANAGERENGINEGOOGLEMAPS_H
#include <QtLocation/QGeoServiceProvider>
#include <QtLocation/QGeoCodingManagerEngine>
#include <QtLocation/QGeoCodeReply>
class QNetworkAccessManager;
class QGeoCodingManagerEngineGooglemaps : public QGeoCodingManagerEngine
{
Q_OBJECT
public:
QGeoCodingManagerEngineGooglemaps(const QVariantMap ¶meters, QGeoServiceProvider::Error *error,
QString *errorString);
~QGeoCodingManagerEngineGooglemaps();
QGeoCodeReply *geocode(const QGeoAddress &address, const QGeoShape &bounds) Q_DECL_OVERRIDE;
QGeoCodeReply *geocode(const QString &address, int limit, int offset,
const QGeoShape &bounds) Q_DECL_OVERRIDE;
QGeoCodeReply *reverseGeocode(const QGeoCoordinate &coordinate,
const QGeoShape &bounds) Q_DECL_OVERRIDE;
private Q_SLOTS:
void replyFinished();
void replyError(QGeoCodeReply::Error errorCode, const QString &errorString);
private:
QNetworkAccessManager *m_networkManager;
QByteArray m_userAgent;
QString m_urlPrefix;
QString m_apiKey;
};
#endif // QGEOCODINGMANAGERENGINEOrs_H