/** * @RDE_HEADER@ * Tile Map Service Layer for Esri * $Id$ * $HeadURL$ * $Author$ * License: BSD 2-Clause */ #pragma once #include #include class QNetworkAccessManager; namespace EsriExtension { /** A small Wrapper around EsriRuntimeQt::TiledMapServiceLayer to * be able to access a tile map service through Qt Runtime SDK. * Sadly Esri does not provide this layer for Qt... * so we have to write one on our own * It's far from perfect but works for our needs. * It was only tested with geoserver 2.8 and EPSG:23632 projection */ class TMSLayer : public EsriRuntimeQt::TiledMapServiceLayer { Q_OBJECT public: explicit TMSLayer(const QString &url, QObject *parent = nullptr); ~TMSLayer(); void initialize() override; private Q_SLOTS: void replyBaseXmlFinished(QNetworkReply *reply); void replyBaseXmlError(QNetworkReply::NetworkError); void onRequestTMSTile(int level, int col, int row); private: void cleanupNetworkReply(QNetworkReply *reply); private: QMap m_tileUrls; QMap m_tilesYAxis; QString m_extension; QNetworkAccessManager *m_nam; }; }