Files
MapLibreParticleLab/platform/qt
Bruno de Oliveira Abinader c4b3c0142c [Qt] Added Qt SDK documentation
Fixes #4970.

[skip ci]
2016-05-08 14:12:28 +03:00
..
2016-05-02 16:06:41 +03:00
2016-05-04 22:01:09 +03:00
2016-05-03 17:11:47 +03:00
2016-05-06 11:59:29 -07:00
2016-05-05 11:30:53 -07:00
2016-05-02 16:06:41 +03:00
2016-05-08 14:12:28 +03:00

Mapbox Qt SDK

Travis

Provides Qt example applications and APIs via QMapboxGL and QQuickMapboxGL:

QMapboxGL - implements a C++03x-conformant API that has been tested from Qt 4.7 onwards (Travis CI currently builds it using both Qt 4 and Qt 5).

QQuickMapboxGL - implements a Qt Quick (QML) item that can be added to a scene. Because QQuickFramebufferObject has been added in Qt version 5.2, we support this API from this version onwards.

Mapbox Qt QML
example

Developing

Qt supports many platforms - so far we have been testing our code on Linux and OS X desktops, as well as embedded devices such as Raspberry Pi 3.

If you need to maintain backwards compatibility with prior releases of Qt, chose QMapboxGL. Otherwise, go for QQuickMapboxGL.

Both QMapboxGL and QQuickMapboxGL requires a Mapbox access token at runtime - you need to provide it by setting the environment variable MAPBOX_ACCESS_TOKEN:

export MAPBOX_ACCESS_TOKEN=MYTOKEN

Linux

For Linux (Ubuntu) desktop, together with these build instructions, you also need:

sudo apt-get install qt5-default qtlocation5-dev qtpositioning5-dev \
qml-module-qtquick2 qml-module-qtpositioning qml-module-qtgraphicaleffects \
qml-module-qtquick-layouts qml-module-qtquick-controls

OS X

For OS X desktop, you can install Qt 5 via Homebrew:

brew install qt5

We provide the following build targets for our Qt SDK:

Build instructions

Qt library

make qt-lib to build the qmapboxgl shared library. Public API headers can be found in platform/qt/include folder.

QMapboxGL example application

make qt-app or make run-qt-app to run the application at the end of build.

QQuickMapboxGL example application:

make qt-qml-app or make run-qt-qml-app to run the application at the end of build.