1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2025-06-27 03:29:16 +02:00

Added support for Mapsforge maps

This commit is contained in:
2021-04-10 15:27:40 +02:00
parent 8fe0f836ae
commit 44a5e5de81
208 changed files with 5761 additions and 475 deletions

View File

@ -39,22 +39,16 @@ AreaItem::AreaItem(const Area &area, Map *map, GraphicsItem *parent)
setAcceptHoverEvents(true);
}
QPainterPath AreaItem::painterPath(const Polygon &polygon)
{
QPainterPath path;
const QVector<Coordinates> &lr = polygon.first();
path.moveTo(_map->ll2xy(lr.first()));
for (int i = 1; i < lr.size(); i++)
path.lineTo(_map->ll2xy(lr.at(i)));
path.closeSubpath();
for (int i = 0; i < polygon.size(); i++) {
const QVector<Coordinates> &subpath = polygon.at(i);
for (int i = 1; i < polygon.size(); i++) {
const QVector<Coordinates> &lr = polygon.at(i);
path.moveTo(_map->ll2xy(lr.first()));
for (int j = 1; j < lr.size(); j++)
path.lineTo(_map->ll2xy(lr.at(j)));
path.moveTo(_map->ll2xy(subpath.first()));
for (int j = 1; j < subpath.size(); j++)
path.lineTo(_map->ll2xy(subpath.at(j)));
path.closeSubpath();
}

View File

@ -9,7 +9,6 @@
#include "common/rectc.h"
#include "common/config.h"
#include "data/waypoint.h"
#include "data/polygon.h"
#include "map/projection.h"
#include "searchpointer.h"
#include "units.h"