mirror of
https://github.com/tumic0/GPXSee.git
synced 2025-07-14 19:04:23 +02:00
Added coordinates checking to file parsers
Refactoring
This commit is contained in:
@ -1,22 +1,28 @@
|
||||
#include <QPainter>
|
||||
#include "config.h"
|
||||
#include "ll.h"
|
||||
#include "rd.h"
|
||||
#include "wgs84.h"
|
||||
#include "tile.h"
|
||||
#include "misc.h"
|
||||
#include "scaleitem.h"
|
||||
|
||||
|
||||
#define BORDER_WIDTH 1
|
||||
#define SCALE_WIDTH 132
|
||||
#define SCALE_HEIGHT 5
|
||||
#define SEGMENTS 3
|
||||
|
||||
#define PADDING 4
|
||||
#define SCALE_WIDTH 132
|
||||
#define SCALE_HEIGHT 5
|
||||
#define SEGMENTS 3
|
||||
#define PADDING 4
|
||||
|
||||
static qreal zoom2resolution(int zoom, qreal y)
|
||||
{
|
||||
return (WGS84_RADIUS * 2 * M_PI / Tile::size()
|
||||
* cos(2 * atan(exp(deg2rad(y))) - M_PI/2)) / pow(2.0, zoom);
|
||||
}
|
||||
|
||||
ScaleItem::ScaleItem(QGraphicsItem *parent) : QGraphicsItem(parent)
|
||||
{
|
||||
_units = Metric;
|
||||
_zoom = ZOOM_MIN;
|
||||
_zoom = 0;
|
||||
_lat = 0;
|
||||
|
||||
#ifndef Q_OS_MAC
|
||||
|
Reference in New Issue
Block a user