Skip to content

Commit

Permalink
Better POI id
Browse files Browse the repository at this point in the history
  • Loading branch information
tumic0 committed Nov 17, 2024
1 parent d4f48f7 commit ee20b02
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/map/mapsforge/mapdata.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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++) {
qint32 lat, lon;
Point p(subfile.pos());

if (!(subfile.readVInt32(lat) && subfile.readVInt32(lon)))
return false;
Point p(Coordinates(tile->pos.lon() + MD(lon),
tile->pos.lat() + MD(lat)));
p.coordinates = Coordinates(tile->pos.lon() + MD(lon),
tile->pos.lat() + MD(lat));

if (!subfile.readByte(sb))
return false;
Expand Down
2 changes: 1 addition & 1 deletion src/map/mapsforge/mapdata.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class MapData
};

struct Point {
Point(const Coordinates &c) : id(qHash(c)), coordinates(c) {}
Point(quint64 id) : id(id) {}

quint64 id;
Coordinates coordinates;
Expand Down

0 comments on commit ee20b02

Please sign in to comment.