GenericMapProvider.h 2.48 KB
Newer Older
1 2 3
#pragma once

#include "MapProvider.h"
Pierre TILAK's avatar
Pierre TILAK committed
4
#include <cmath>
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

#include <QByteArray>
#include <QMutex>
#include <QNetworkProxy>
#include <QNetworkReply>
#include <QPoint>
#include <QString>

class StatkartMapProvider : public MapProvider {
    Q_OBJECT
  public:
    StatkartMapProvider(QObject* parent)
        : MapProvider(QString("https://www.norgeskart.no/"), QString("png"),
                      AVERAGE_TILE_SIZE, QGeoMapType::StreetMap, parent) {}

    QString _getURL(int x, int y, int zoom,
                    QNetworkAccessManager* networkManager);
};

class EniroMapProvider : public MapProvider {
    Q_OBJECT
  public:
    EniroMapProvider(QObject* parent)
        : MapProvider(QString("https://www.eniro.se/"), QString("png"),
                      AVERAGE_TILE_SIZE, QGeoMapType::StreetMap, parent) {}

    QString _getURL(int x, int y, int zoom,
                    QNetworkAccessManager* networkManager);
};
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85

class MapQuestMapMapProvider : public MapProvider {
    Q_OBJECT
  public:
    MapQuestMapMapProvider(QObject* parent)
        : MapProvider(QString("https://mapquest.com"), QString("jpg"),
                      AVERAGE_TILE_SIZE, QGeoMapType::StreetMap, parent) {}

    QString _getURL(int x, int y, int zoom,
                    QNetworkAccessManager* networkManager);
};

class MapQuestSatMapProvider : public MapProvider {
    Q_OBJECT
  public:
    MapQuestSatMapProvider(QObject* parent)
        : MapProvider(QString("https://mapquest.com"), QString("jpg"),
                      AVERAGE_TILE_SIZE, QGeoMapType::SatelliteMapDay, parent) {
    }

    QString _getURL(int x, int y, int zoom,
                    QNetworkAccessManager* networkManager);
};

class VWorldStreetMapProvider : public MapProvider {
    Q_OBJECT
  public:
    VWorldStreetMapProvider(QObject* parent)
        : MapProvider(QString("www.vworld.kr"), QString("png"),
                      AVERAGE_TILE_SIZE, QGeoMapType::StreetMap, parent) {}

    QString _getURL(int x, int y, int zoom,
                    QNetworkAccessManager* networkManager);

  private:
    const QString _versionBingMaps = "563";
};

class VWorldSatMapProvider : public MapProvider {
    Q_OBJECT
  public:
    VWorldSatMapProvider(QObject* parent)
        : MapProvider(QString("www.vworld.kr"), QString("jpg"),
                      AVERAGE_TILE_SIZE, QGeoMapType::SatelliteMapDay, parent) {
    }

    QString _getURL(int x, int y, int zoom,
                    QNetworkAccessManager* networkManager);

  private:
    const QString _versionBingMaps = "563";
};