1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-10-06 23:03:22 +02:00
GPXSee/src/map/mapsource.h

58 lines
1.0 KiB
C
Raw Normal View History

2018-01-29 00:19:57 +01:00
#ifndef MAPSOURCE_H
#define MAPSOURCE_H
#include <QList>
#include "common/range.h"
#include "common/rectc.h"
2018-09-30 12:16:41 +02:00
#include "common/kv.h"
#include "common/downloader.h"
2018-04-05 21:13:48 +02:00
#include "coordinatesystem.h"
class Map;
class QXmlStreamReader;
class Projection;
2018-01-29 00:19:57 +01:00
class MapSource
{
public:
static Map *create(const QString &path, const Projection &proj, bool *isDir);
private:
enum Type {
OSM,
WMTS,
2018-09-22 13:32:54 +02:00
WMS,
2019-05-20 23:23:24 +02:00
TMS,
QuadTiles
};
struct Config {
Type type;
QString name;
QString url;
Range zooms;
RectC bounds;
QString layer;
QString style;
QString set;
QString format;
QString crs;
2018-04-07 18:42:25 +02:00
CoordinateSystem coordinateSystem;
bool rest;
QList<KV<QString, QString> > dimensions;
Authorization authorization;
2018-08-18 21:06:36 +02:00
qreal tileRatio;
int tileSize;
bool scalable;
Config();
};
2018-05-22 22:40:15 +02:00
static RectC bounds(QXmlStreamReader &reader);
static Range zooms(QXmlStreamReader &reader);
static void map(QXmlStreamReader &reader, Config &config);
2018-12-08 02:27:27 +01:00
static void tile(QXmlStreamReader &reader, Config &config);
};
2018-01-29 00:19:57 +01:00
#endif // MAPSOURCE_H