/**************************************************************************** * * (c) 2009-2016 QGROUNDCONTROL PROJECT * * QGroundControl is licensed according to the terms in the file * COPYING.md in the root of the source code directory. * ****************************************************************************/ /** * @file * @author Gus Grubba */ #ifndef QGC_MAP_URL_ENGINE_H #define QGC_MAP_URL_ENGINE_H #include "GoogleMapProvider.h" #include "BingMapProvider.h" #include "GenericMapProvider.h" #include "EsriMapProvider.h" #include "MapboxMapProvider.h" #define MAX_MAP_ZOOM (20.0) class UrlFactory : public QObject { Q_OBJECT public: // // /* // MapQuestMap = 700, // MapQuestSat = 701, // */ // // VWorldMap = 800, // VWorldSatellite = 801, // VWorldStreet = 802, // // AirmapElevation = 8001 // }; UrlFactory (); ~UrlFactory (); QNetworkRequest getTileURL (QString type, int x, int y, int zoom, QNetworkAccessManager* networkManager); QNetworkRequest getTileURL (int id, int x, int y, int zoom, QNetworkAccessManager* networkManager); QString getImageFormat (QString type, const QByteArray& image); QString getImageFormat (int id , const QByteArray& image); quint32 averageSizeForType (QString type); QHash getProviderTable(){return _providersTable;} int getIdFromType(QString type); QString getTypeFromId(int id); private: int _timeout; QHash _providersTable; void registerProvider(QString Name, MapProvider* provider); // BingMaps //QString _versionBingMaps; }; #endif