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:
@ -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();
|
||||
}
|
||||
|
||||
|
@ -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"
|
||||
|
Reference in New Issue
Block a user