Skip to content

Commit

Permalink
QMapboxGL got merged into Mapbox GL Native
Browse files Browse the repository at this point in the history
Fixes #14
  • Loading branch information
tmpsantos committed Apr 21, 2016
1 parent d0ac49a commit cbf3b8c
Show file tree
Hide file tree
Showing 15 changed files with 5 additions and 11,784 deletions.
5 changes: 0 additions & 5 deletions .gitignore

This file was deleted.

24 changes: 0 additions & 24 deletions LICENSE

This file was deleted.

61 changes: 5 additions & 56 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,62 +1,11 @@
# QMapboxGL
# QMapboxGL is now on the Mapbox GL Native tree!

QMapboxGL is a Qt-enabled viewport for vector tiles using [Mapbox GL](https://github.com/mapbox/mapbox-gl-native) for rendering. It can be used for online and offline rendering of vector tiles.
QMapboxGL got merged into [Mapbox GL Native](https://github.com/mapbox/mapbox-gl-native).

### Demo
You can browse the code [here](https://github.com/mapbox/mapbox-gl-native/blob/master/platform/qt).

A simple example rendering the Mapbox base vector tiles layer based on [OpenStreetMap](http://www.openstreetmap.org) using different styles.

![](https://i.imgur.com/IQd3k8i.gif)

### Sample code

```c++
#include <QtGui>
#include <QMapboxGL>

int main(int argc, char **argv) {
QGuiApplication app(argc, argv);

QFile data("/usr/share/mbgl/styles/emerald-v7.json");
data.open(QFile::ReadOnly);

QTextStream style(&data);

QMapboxGL map;
map.setAccessToken(qgetenv("MAPBOX_ACCESS_TOKEN"));
map.setStyleJSON(style.readAll());

map.resize(800, 600);
map.show();

return app.exec();
}
```
### Build instructions for Ubuntu Vivid or Debian Jessie
##### Install the Mapbox GL development packages:
```
$ sudo apt-add-repository ppa:tmpsantos/mapbox-gl
$ sudo apt-get update
$ sudo apt-get install libmbgl-dev
```
##### Clone this repository and build:
```
$ git clone https://github.com/tmpsantos/qmapboxgl.git
$ cd qmapboxgl
$ mkdir build
$ cd build
$ qmake ..
$ make
```
##### Run the example:
You need to export `MAPBOX_ACCESS_TOKEN` if you are using vector tiles hosted at Mapbox servers. Get one access token for free [here](https://www.mapbox.com/).
Try it now by cloning the Mapbox GL Native and running the following on Linux or OSX:

```
$ MAPBOX_ACCESS_TOKEN=pk.XXXXXXXXXXXX ./qmapboxgl
$ make run-qt-app
```
91 changes: 0 additions & 91 deletions example/example.cpp

This file was deleted.

1 change: 0 additions & 1 deletion include/QMapboxGL

This file was deleted.

47 changes: 0 additions & 47 deletions include/qmapboxgl.h

This file was deleted.

52 changes: 0 additions & 52 deletions qmapboxgl.pro

This file was deleted.

Loading

0 comments on commit cbf3b8c

Please sign in to comment.