diff --git a/src/pbfhandler.cpp b/src/pbfhandler.cpp index d00ff3f..828efaf 100644 --- a/src/pbfhandler.cpp +++ b/src/pbfhandler.cpp @@ -79,16 +79,17 @@ bool PBFHandler::read(QImage *image) return false; } - bool ok; - int zoom = format().toInt(&ok); + QList list(format().split(';')); + int zoom = list.size() ? list.first().toInt() : 0; + int overzoom = (list.size() > 1) ? list.at(1).toInt() : 0; QSize size = _scaledSize.isValid() ? _scaledSize : QSize(TILE_SIZE, TILE_SIZE); - QPointF scale = _scaledSize.isValid() - ? QPointF((qreal)_scaledSize.width() / TILE_SIZE, - (qreal)_scaledSize.height() / TILE_SIZE) : QPointF(1.0, 1.0); + QPointF scale((qreal)size.width() / (TILE_SIZE << overzoom), + (qreal)size.height() / (TILE_SIZE << overzoom)); + *image = QImage(size, QImage::Format_ARGB32_Premultiplied); - Tile tile(image, ok ? zoom : -1, scale); + Tile tile(image, zoom, scale); _style->render(data, tile); diff --git a/style/style.json b/style/style.json index eae6366..05d9a52 100644 --- a/style/style.json +++ b/style/style.json @@ -2265,7 +2265,6 @@ "source": "openmaptiles", "source-layer": "building", "minzoom": 13, - "maxzoom": 14, "layout": { "visibility": "visible" }, @@ -4059,4 +4058,4 @@ } ], "id": "osm-liberty" -} \ No newline at end of file +}