mirror of
https://github.com/tumic0/QtPBFImagePlugin.git
synced 2024-11-24 03:35:54 +01:00
Added basic info
This commit is contained in:
parent
88295f0ca7
commit
3073de5bb1
44
README.md
44
README.md
@ -1,2 +1,44 @@
|
||||
# QtPBFImagePlugin
|
||||
Qt image plugin for displaying Mapbox PBF tiles
|
||||
Qt image plugin for displaying Mapbox vector tiles
|
||||
|
||||
## Description
|
||||
QtPBFImagePlugin is a Qt image plugin that enables applications capable of
|
||||
displaying raster MBTiles maps to also display vector (PBF) tiles without
|
||||
(almost, see usage) any application modifications.
|
||||
|
||||
Standard Mapbox GL Styles are used for styling the maps. Most style features
|
||||
used by [Maputnik](http://editor.openmaptiles.org) are supported. The style
|
||||
is loaded from /usr/share/pbf/style.json or ~/.pbf/style.json if it exists.
|
||||
|
||||
## Usage
|
||||
Due to a major design flaw in the Mapbox vector tiles specification (the zoom
|
||||
is not part of the PBF data), the plugin can not be used "as is", but passing
|
||||
the zoom level is necessary. This is done by exploiting the optional format
|
||||
parameter of the QImage constructor or the QImage::fromData() or
|
||||
QPixmap::loadFromData() functions. The zoom number is passed as ASCII string
|
||||
to the functions:
|
||||
```cpp
|
||||
QPixmap pm;
|
||||
pm.loadFromData(tileData(_zoom), QString::number(_zoom).toLatin1());
|
||||
```
|
||||
|
||||
## Build
|
||||
Build requirements:
|
||||
* QT 5.x
|
||||
* Google Protocol Buffers (protobuf-lite)
|
||||
|
||||
Build steps:
|
||||
```shell
|
||||
qmake gpxsee.pro
|
||||
make
|
||||
```
|
||||
|
||||
## Install
|
||||
Copy the plugin to the system Qt image plugins path to make it work. You may
|
||||
also set the QT_PLUGIN_PATH system variable before starting the application.
|
||||
|
||||
## Limitations
|
||||
As the plugin only has isolated info about a single tile image, texts
|
||||
overlapping to neighbour tiles can not be displayed or their overlapping can
|
||||
not be avoided (the plugin uses the first approach). This is a principal
|
||||
constraint that can't be evaded.
|
||||
|
Loading…
Reference in New Issue
Block a user