1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-11-24 03:35:53 +01:00

Better POI id

This commit is contained in:
Martin Tůma 2024-11-17 17:11:14 +01:00
parent d4f48f71bb
commit ee20b02dfa
2 changed files with 4 additions and 3 deletions

View File

@ -697,11 +697,12 @@ bool MapData::readPoints(const VectorTile *tile, int zoom, QList<Point> *list)
for (unsigned i = 0; i < points[zoom - info.min]; i++) { for (unsigned i = 0; i < points[zoom - info.min]; i++) {
qint32 lat, lon; qint32 lat, lon;
Point p(subfile.pos());
if (!(subfile.readVInt32(lat) && subfile.readVInt32(lon))) if (!(subfile.readVInt32(lat) && subfile.readVInt32(lon)))
return false; return false;
Point p(Coordinates(tile->pos.lon() + MD(lon), p.coordinates = Coordinates(tile->pos.lon() + MD(lon),
tile->pos.lat() + MD(lat))); tile->pos.lat() + MD(lat));
if (!subfile.readByte(sb)) if (!subfile.readByte(sb))
return false; return false;

View File

@ -37,7 +37,7 @@ public:
}; };
struct Point { struct Point {
Point(const Coordinates &c) : id(qHash(c)), coordinates(c) {} Point(quint64 id) : id(id) {}
quint64 id; quint64 id;
Coordinates coordinates; Coordinates coordinates;