QGeoView icon indicating copy to clipboard operation
QGeoView copied to clipboard

load tms offline from directory

Open mola opened this issue 5 years ago • 3 comments

load tms in offline mode from directory with thread

mola avatar Jul 07 '20 07:07 mola

First of all sorry for delay :)

AmonRaNet avatar Jan 05 '21 01:01 AmonRaNet

It is very difficult to review your delta, because 90% of changes is difference in formatting. Please run clang-format against code base or better activate pre-commit hooks (https://pre-commit.com/). Second is better :)

AmonRaNet avatar Jan 05 '21 01:01 AmonRaNet

@mola Already much better - good job :) but there still many irrelevant changes related to style only. I am not against style changes (but then it should be applied for whole code base and as separated PR).

One more generic question - why you want to have fully custom tiled layer class? It should be possible to have QGVLayerFiles : public QGVLayerTilesOnline with

QString QGVLayerFiles::tilePosToUrl(const QGV::GeoTilePos& tilePos) const
{
    QString url = "file:///path/to/tiles/${z}/${x}/${y}.jpg";
    url.replace("${z}", QString::number(tilePos.zoom()));
    url.replace("${x}", QString::number(tilePos.pos().x()));
    url.replace("${y}", QString::number(tilePos.pos().y()));
    return url;
}

Existing NetwokManager should then manage async file request as usually.

Or even more simple: QGVLayerOSM("file:///path/to/tiles/${z}/${x}/${y}.jpg")

AmonRaNet avatar Jan 27 '21 15:01 AmonRaNet

Closed as changes not actual anymore

AmonRaNet avatar Apr 23 '23 21:04 AmonRaNet