26 Commits

Author SHA1 Message Date
0db93fd5ee Use GPXSee compatible Qt versions 2023-09-26 20:14:58 +02:00
f8044efda6 Fixed triplet path 2023-09-26 20:14:18 +02:00
450a1458a3 Use the propper static/dynamic crt triplet 2023-09-26 19:43:01 +02:00
bff8c7229c Fixed artifacts path 2023-09-22 10:49:16 +02:00
ff569644b6 Back to non-static vcpkg 2023-09-22 09:57:43 +02:00
6a32f0a447 Rename zlib lib to fit the pro file 2023-09-22 09:19:37 +02:00
1051a1c5b2 Use the static vcpkg builds 2023-09-22 02:02:45 +02:00
11e360d9a4 Fixed protoc path + added cache 2023-09-22 01:18:25 +02:00
5577590f6b Added AppVeyor build config 2023-09-22 00:50:12 +02:00
9dba35082b Use protobuf@21 in OS X build 2023-09-21 01:00:14 +02:00
76f1a23f8d Switch to Qt6 in OS X build 2023-09-21 00:45:41 +02:00
f931b653c4 Yet anothe OS X build fix 2023-09-21 00:23:35 +02:00
b0885a4b05 Trying to fix the OS X build 2023-09-21 00:12:48 +02:00
7c34a2c4e1 Use protobuf@21 in OS X builds 2023-09-20 23:48:06 +02:00
0cb3edda05 Fixed compiler warning 2023-09-20 23:36:30 +02:00
871aad37da Fix MacOS CI build 2023-05-05 23:26:03 +02:00
12c878d8e2 Proprly initialize the tile with transparent background 2023-05-05 19:15:36 +02:00
44862114ab Added Ordnance Survey and Esri styles info 2022-06-08 01:02:04 +02:00
1065a27bfb Fixed cut&paste error 2022-01-04 08:36:18 +01:00
3c22cd7823 Added linux CI build 2022-01-04 08:34:24 +01:00
1afd242302 Get rid of TravisCI 2021-10-27 17:48:33 +02:00
ae8b2f00db Added GitHub actions OS X build 2021-10-27 17:42:47 +02:00
e22ea9aa12 Updated Maputnik editor URL 2021-07-16 22:23:58 +02:00
62a78fdaae protobufs are already installed 2021-05-28 08:00:28 +02:00
63f86a900e Trying to fix the OS X TravisCI build... 2021-05-28 07:29:40 +02:00
ea8819a381 Updated minimal Qt version
Qt 5.11 works as well
2020-12-29 10:50:49 +01:00
7 changed files with 118 additions and 28 deletions

32
.appveyor.yml Normal file
View File

@ -0,0 +1,32 @@
version: 2.4.{build}
configuration:
- Release
image:
- Visual Studio 2022
environment:
VCPKGDIR: C:\tools\vcpkg\installed\x64-windows-static-md
matrix:
- QTDIR: C:\Qt\5.15\msvc2019_64
- QTDIR: C:\Qt\6.5\msvc2019_64
install:
- cmd: |-
set PATH=%QTDIR%\bin;%VCPKGDIR%\tools\protobuf;%PATH%
call "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat
vcpkg install protobuf:x64-windows-static-md
vcpkg install zlib:x64-windows-static-md
copy /y %VCPKGDIR%\lib\zlib.lib %VCPKGDIR%\lib\zlibstatic.lib
build_script:
- cmd: |-
qmake PROTOBUF=%VCPKGDIR% ZLIB=%VCPKGDIR% pbfplugin.pro
nmake release
artifacts:
- path: release\pbf.dll
cache:
- C:\tools\vcpkg\installed\

22
.github/workflows/linux.yml vendored Normal file
View File

@ -0,0 +1,22 @@
name: Linux
on:
push:
branches:
- master
jobs:
build:
name: QtPBFImagePlugin
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install qtbase5-dev qtbase5-dev-tools qt5-qmake libprotobuf-dev protobuf-compiler zlib1g-dev
- name: Configure build
run: qmake pbfplugin.pro
- name: Build project
run: make -j2

55
.github/workflows/osx.yml vendored Normal file
View File

@ -0,0 +1,55 @@
name: OS X
on:
push:
branches:
- master
jobs:
qt5:
name: QtPBFImagePlugin Qt5 build
runs-on: macos-latest
steps:
- name: Set environment variables
run: echo "PATH=/usr/local/opt/protobuf@21/bin:$PATH" >> $GITHUB_ENV
- name: Checkout
uses: actions/checkout@v3
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
version: '5.15.2'
- name: Install protobuf
run: brew install protobuf@21
- name: Configure build
run: qmake PROTOBUF=/usr/local/opt/protobuf@21 pbfplugin.pro
- name: Build project
run: make -j3
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: libpbf-qt5.dylib
path: libpbf.dylib
qt6:
name: QtPBFImagePlugin Qt6 build
runs-on: macos-latest
steps:
- name: Set environment variables
run: echo "PATH=/usr/local/opt/protobuf@21/bin:$PATH" >> $GITHUB_ENV
- name: Checkout
uses: actions/checkout@v3
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
version: '6.5.1'
- name: Install protobuf
run: brew install protobuf@21
- name: Configure build
run: qmake PROTOBUF=/usr/local/opt/protobuf@21 pbfplugin.pro
- name: Build project
run: make -j3
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: libpbf-qt6.dylib
path: libpbf.dylib

View File

@ -1,23 +0,0 @@
language: c++
dist: focal
os:
- linux
- osx
env:
- QT_SELECT=qt5
before_install:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get -qq update; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; fi
install:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install qt protobuf; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get install qtbase5-dev qtbase5-dev-tools qt5-qmake libprotobuf-dev protobuf-compiler; fi
script:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then PATH=/usr/local/opt/qt/bin/:${PATH}; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then qmake PROTOBUF=/usr/local pbfplugin.pro; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then qmake pbfplugin.pro; fi
- make

View File

@ -7,7 +7,7 @@ displaying raster MBTiles maps or raster XYZ online maps to also display
PBF(MVT) vector tiles without (almost, see usage) any application modifications.
Standard Mapbox GL Styles are used for styling the maps. Most relevant style
features used by [Maputnik](http://editor.openmaptiles.org) are supported.
features used by [Maputnik](https://maputnik.github.io/editor) are supported.
A default fallback style (OSM-Liberty) for OpenMapTiles is part of the plugin.
"Plain" PBF files as well as gzip compressed files (as used in MBTiles) are
@ -43,7 +43,8 @@ The map style is loaded from the
file on plugin load. If the style uses a sprite, the sprite JSON file must
be named `sprite.json` and the sprite image `sprite.png` and both files must be
placed in the same directory as the style itself. *A style compatible with the
tiles data schema (Mapbox, OpenMapTiles, Tilezen) must be used.*
tiles data schema (Mapbox, OpenMapTiles, Tilezen, Ordnance Survey, Esri, ...)
must be used.*
For a list of "ready to use" styles see the
[QtPBFImagePlugin-styles](https://github.com/tumic0/QtPBFImagePlugin-styles)
@ -51,7 +52,7 @@ repository.
## Build
### Requirements
* Qt5 >= 5.12 or Qt6
* Qt5 >= 5.11 or Qt6
* Google Protocol Buffers (protobuf-lite)
* Zlib

View File

@ -6,7 +6,7 @@
QByteArray Gzip::uncompress(QIODevice *device, int limit)
{
int ret;
int ret = Z_STREAM_END;
z_stream strm;
unsigned char in[CHUNK];
unsigned char out[CHUNK];

View File

@ -11,7 +11,10 @@ public:
: _zoom(zoom), _size(img->size()), _scale(scale),
_text(QSize(img->size().width() / scale.x(),
img->size().height() / scale.y())), _painter(img)
{_painter.scale(scale.x(), scale.y());}
{
img->fill(Qt::transparent);
_painter.scale(scale.x(), scale.y());
}
int zoom() const {return _zoom;}
const QSize &size() const {return _size;}