1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-11-25 04:05:53 +01:00
GPXSee/src/map/osm.h
2018-09-25 21:07:44 +02:00

24 lines
563 B
C++

#ifndef OSM_H
#define OSM_H
#include <QPointF>
#include <common/coordinates.h>
#include <common/rectc.h>
#include <common/range.h>
namespace OSM
{
static const RectC BOUNDS(Coordinates(-180, 85.0511),
Coordinates(180, -85.0511));
static const Range ZOOMS(0, 19);
QPointF ll2m(const Coordinates &c);
Coordinates m2ll(const QPointF &p);
QPoint mercator2tile(const QPointF &m, int zoom);
qreal zoom2scale(int zoom, int tileSize);
int scale2zoom(qreal scale, int tileSize);
qreal resolution(const QPointF &p, int zoom, int tileSize);
}
#endif // OSM_H