1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-10-07 07:13:21 +02:00
GPXSee/src/map/mapsource.h

53 lines
875 B
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"
#include "downloader.h"
2018-04-05 21:13:48 +02:00
#include "coordinatesystem.h"
class Map;
class QXmlStreamReader;
2018-01-29 00:19:57 +01:00
class MapSource
{
public:
2018-02-20 23:37:19 +01:00
Map *loadFile(const QString &path);
const QString &errorString() const {return _errorString;}
private:
enum Type {
OSM,
WMTS,
WMS
};
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;
2018-03-11 10:31:41 +01:00
QList<QPair<QString, QString> > dimensions;
Authorization authorization;
Config();
};
2018-02-27 21:50:29 +01:00
RectC bounds(QXmlStreamReader &reader);
Range zooms(QXmlStreamReader &reader);
void map(QXmlStreamReader &reader, Config &config);
QString _errorString;
};
2018-01-29 00:19:57 +01:00
#endif // MAPSOURCE_H