GenericMapProvider.h 2.9 KB
Newer Older
Cosmin Marc's avatar
Cosmin Marc committed
1 2 3 4 5 6 7 8
/****************************************************************************
 *
 *   (c) 2009-2019 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
 *
 * QGroundControl is licensed according to the terms in the file
 * COPYING.md in the root of the source code directory.
 *
 ****************************************************************************/
9 10 11 12 13 14 15
#pragma once

#include "MapProvider.h"

class StatkartMapProvider : public MapProvider {
    Q_OBJECT
  public:
Cosmin Marc's avatar
Cosmin Marc committed
16 17
    StatkartMapProvider(QObject* parent = nullptr)
        : MapProvider(QStringLiteral("https://www.norgeskart.no/"), QStringLiteral("png"),
18 19
                      AVERAGE_TILE_SIZE, QGeoMapType::StreetMap, parent) {}

Cosmin Marc's avatar
Cosmin Marc committed
20
    QString _getURL(const int x, const int y, const int zoom, QNetworkAccessManager* networkManager) override;
21 22 23 24 25
};

class EniroMapProvider : public MapProvider {
    Q_OBJECT
  public:
Cosmin Marc's avatar
Cosmin Marc committed
26 27
    EniroMapProvider(QObject* parent = nullptr)
        : MapProvider(QStringLiteral("https://www.eniro.se/"), QStringLiteral("png"),
28 29
                      AVERAGE_TILE_SIZE, QGeoMapType::StreetMap, parent) {}

Cosmin Marc's avatar
Cosmin Marc committed
30
    QString _getURL(const int x, const int y, const int zoom, QNetworkAccessManager* networkManager) override;
31
};
32 33 34 35

class MapQuestMapMapProvider : public MapProvider {
    Q_OBJECT
  public:
Cosmin Marc's avatar
Cosmin Marc committed
36 37
    MapQuestMapMapProvider(QObject* parent = nullptr)
        : MapProvider(QStringLiteral("https://mapquest.com"), QStringLiteral("jpg"),
38 39
                      AVERAGE_TILE_SIZE, QGeoMapType::StreetMap, parent) {}

Cosmin Marc's avatar
Cosmin Marc committed
40
    QString _getURL(const int x, const int y, const int zoom, QNetworkAccessManager* networkManager) override;
41 42 43 44 45
};

class MapQuestSatMapProvider : public MapProvider {
    Q_OBJECT
  public:
Cosmin Marc's avatar
Cosmin Marc committed
46 47 48
    MapQuestSatMapProvider(QObject* parent = nullptr)
        : MapProvider(QStringLiteral("https://mapquest.com"), QStringLiteral("jpg"),
                      AVERAGE_TILE_SIZE, QGeoMapType::SatelliteMapDay, parent) {}
49

Cosmin Marc's avatar
Cosmin Marc committed
50
    QString _getURL(const int x, const int y, const int zoom, QNetworkAccessManager* networkManager) override;
51 52 53 54 55
};

class VWorldStreetMapProvider : public MapProvider {
    Q_OBJECT
  public:
Cosmin Marc's avatar
Cosmin Marc committed
56 57
    VWorldStreetMapProvider(QObject* parent = nullptr)
        : MapProvider(QStringLiteral("www.vworld.kr"), QStringLiteral("png"),
58 59
                      AVERAGE_TILE_SIZE, QGeoMapType::StreetMap, parent) {}

Cosmin Marc's avatar
Cosmin Marc committed
60
    QString _getURL(const int x, const int y, const int zoom, QNetworkAccessManager* networkManager) override;
61 62

  private:
Cosmin Marc's avatar
Cosmin Marc committed
63
    const QString _versionBingMaps = QStringLiteral("563");
64 65 66 67 68
};

class VWorldSatMapProvider : public MapProvider {
    Q_OBJECT
  public:
Cosmin Marc's avatar
Cosmin Marc committed
69 70 71
    VWorldSatMapProvider(QObject* parent = nullptr)
        : MapProvider(QStringLiteral("www.vworld.kr"), QStringLiteral("jpg"),
                      AVERAGE_TILE_SIZE, QGeoMapType::SatelliteMapDay, parent) {}
72

Cosmin Marc's avatar
Cosmin Marc committed
73
    QString _getURL(const int x, const int y, const int zoom, QNetworkAccessManager* networkManager) override;
74 75

  private:
Cosmin Marc's avatar
Cosmin Marc committed
76
    const QString _versionBingMaps = QStringLiteral("563");
77
};