Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

Commit f8f735b

Browse files
committed
Rewrote documentation
Rewrote some copy to provide more context and link to more GL-related repos, including GL JS. Put the various SDKs in a table so we can show the various CI bot status images. Integrated target list into the relevant documents. Rewrote large portions of iOS and OS X setup documentation to guide normal developers to more friendly places. Combined some Android documentation. Moved SDK-specific documentation into platform/. Added a temporary readme in ios/ that points to the one in platform/ios/.
1 parent 6af69e4 commit f8f735b

20 files changed

+180
-132
lines changed

INSTALL.md

+6-16
Original file line numberDiff line numberDiff line change
@@ -51,20 +51,10 @@ dependencies:
5151

5252
## 3: Setting up a development environment & building
5353

54-
This depends on what operating systems you're using, and what platforms you're
55-
developing for:
54+
See the relevant SDK documentation for next steps:
5655

57-
**on OS X**
58-
59-
* [For OS X on OS X](docs/DEVELOP_OSX.md)
60-
* [For iOS on OS X](docs/DEVELOP_IOS_OSX.md)
61-
* [For Android on OS X](docs/DEVELOP_ANDROID_OSX.md)
62-
63-
**on Linux**
64-
65-
* [For Linux on Linux](docs/DEVELOP_LINUX.md)
66-
* [For Android on Linux](docs/DEVELOP_ANDROID_LINUX.md)
67-
68-
**Node.js bindings**
69-
70-
* [Developing Node.js bindings](docs/DEVELOP_NODE.md)
56+
* [Mapbox Android SDK](platform/android/)
57+
* [Mapbox iOS SDK](platform/ios/)
58+
* [Mapbox OS X SDK](platform/osx/)
59+
* [Mapbox GL Native on Linux](platform/linux/)
60+
* [node-mapbox-gl-native](platform/node/)

README.md

+15-21
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,23 @@
11
# Mapbox GL Native
22

3-
[![Travis](https://api.travis-ci.org/mapbox/mapbox-gl-native.svg?branch=master)](https://travis-ci.org/mapbox/mapbox-gl-native/builds) [![Bitrise](https://www.bitrise.io/app/7514e4cf3da2cc57.svg?token=OwqZE5rSBR9MVWNr_lf4sA&branch=master)](https://www.bitrise.io/app/7514e4cf3da2cc57)
3+
A library for embedding interactive vector maps into native applications on multiple platforms. It takes stylesheets that conform to the [Mapbox GL Style Specification](https://github.com/mapbox/mapbox-gl-style-spec/), applies them to vector tiles that conform to the [Mapbox Vector Tile Specification](https://github.com/mapbox/vector-tile-spec), and renders them using OpenGL. [Mapbox GL JS](https://github.com/mapbox/mapbox-gl-js) is the WebGL-based counterpart, designed for use on the Web.
44

5-
An OpenGL-based renderer for [Mapbox Vector Tiles](https://www.mapbox.com/blog/vector-tiles), consisting of a C++ library for Linux and SDK bindings for iOS, Android, Node.js, and OS X.
5+
## The Mapbox GL ecosystem
66

7-
**This repository is for development on Mapbox GL Native itself.**
7+
This repository hosts the cross-platform Mapbox GL Native library, plus convenient SDKs for several platforms. The cross-platform library comes with a [GLFW](https://github.com/glfw/glfw)-based demo application for Ubuntu Linux and OS X. The SDKs target the usual languages on their respective platforms:
88

9-
If you want to use products _based on_ Mapbox GL, check out:
9+
SDK | Languages | Build status
10+
----|-----------|-------------
11+
[Mapbox GL Native](INSTALL.md) | C++14 | [![Travis](https://travis-ci.org/mapbox/mapbox-gl-native.svg?branch=master)](https://travis-ci.org/mapbox/mapbox-gl-native/builds)
12+
[Mapbox Android SDK](platform/android/) | Java | [![Bitrise](https://www.bitrise.io/app/79cdcbdc42de4303.svg?token=_InPF8bII6W7J6kFr-L8QQ&branch=master)](https://www.bitrise.io/app/79cdcbdc42de4303)
13+
[Mapbox iOS SDK](platform/ios/) | Objective-C or Swift | [![Bitrise](https://www.bitrise.io/app/7514e4cf3da2cc57.svg?token=OwqZE5rSBR9MVWNr_lf4sA&branch=master)](https://www.bitrise.io/app/7514e4cf3da2cc57)
14+
[Mapbox OS X SDK](platform/osx/) | Objective-C or Swift | [![Bitrise](https://www.bitrise.io/app/155ef7da24b38dcd.svg?token=4KSOw_gd6WxTnvGE2rMttg&branch=master)](https://www.bitrise.io/app/155ef7da24b38dcd)
15+
[node-mapbox-gl-native](platform/node/) | Node.js | [![Travis](https://travis-ci.org/mapbox/mapbox-gl-native.svg?branch=master)](https://travis-ci.org/mapbox/mapbox-gl-native/builds)
1016

11-
- [Mapbox Mobile](http://mapbox.com/mobile) — iOS and Android native development libraries
12-
- [`mapbox-gl-native`](https://www.npmjs.com/package/mapbox-gl-native) - Node.js native module
13-
- [`react-native-mapbox-gl`](https://github.com/mapbox/react-native-mapbox-gl) — React Native library
14-
- [`qmapboxgl`](https://github.com/tmpsantos/qmapboxgl) — Qt library
15-
- [`Mapbox Cordova Plugin`](http://plugins.telerik.com/cordova/plugin/mapbox) - Telerik's Apache Cordova plugin
17+
Additional Mapbox GL Native–based libraries are developed outside of this repository:
1618

17-
--
19+
* [React Native Mapbox GL](https://github.com/mapbox/react-native-mapbox-gl) for React Native applications on iOS and Android
20+
* [QMapboxGL](https://github.com/tmpsantos/qmapboxgl) for Qt-based applications
21+
* Telerik’s [Mapbox plugin](http://plugins.telerik.com/cordova/plugin/mapbox) for Apache Cordova applications
1822

19-
## Targets
20-
21-
* Ubuntu Linux
22-
* OS X 10.10+
23-
* iOS 7.0+
24-
* iPhone 4S and above (5, 5c, 5s, 6, 6 Plus)
25-
* iPad 2 and above (3, 4, Mini, Air, Mini 2, Air 2)
26-
* iPod touch 5th gen and above
27-
* Android 4.0.3+ (API level 15+)
28-
29-
See [`INSTALL.md`](./INSTALL.md) for development setup and install instructions, including dependencies.
23+
If your platform or hybrid application framework isn’t listed here, consider embedding [Mapbox GL JS](https://github.com/mapbox/mapbox-gl-js) using the standard Web capabilities on your platform.

docs/ANDROID_DEVICE.md

-7
This file was deleted.

docs/ANDROID_SIMULATOR.md

-21
This file was deleted.

docs/DEVELOP_NODE.md

-34
This file was deleted.

docs/DEVELOP_OSX.md

-19
This file was deleted.

ios/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
The Mapbox iOS SDK is [located here](../platform/ios/).
File renamed without changes.
File renamed without changes.

docs/DEVELOP_ANDROID_OSX.md platform/android/INSTALL_OSX.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Developing for Android on OS X
1+
# Installing the Mapbox Android SDK on OS X
22

33
Install Oracle JDK 7+ and Android Studio:
44

platform/android/README.md

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# [Mapbox Android SDK](https://www.mapbox.com/android-sdk/)
2+
3+
[![Bitrise](https://www.bitrise.io/app/79cdcbdc42de4303.svg?token=_InPF8bII6W7J6kFr-L8QQ&branch=master)](https://www.bitrise.io/app/79cdcbdc42de4303)
4+
5+
A library based on [Mapbox GL Native](../../README.md) for embedding interactive vector maps into Java applications on Android devices.
6+
7+
This repository is for day-to-day development of the SDK. Building the SDK yourself requires [a number of dependencies and steps](../../INSTALL.md) that are unnecessary for developing production applications. For production applications, please consider installing an official, prebuilt release instead; see the [Mapbox Android SDK website](https://www.mapbox.com/android-sdk/) for installation instructions.
8+
9+
## Installing the SDK
10+
11+
* [Installing the Mapbox Android SDK on Linux](INSTALL_LINUX.md)
12+
* [Installing the Mapbox Android SDK on OS X](INSTALL_OSX.md)
13+
14+
## Setting up the Android emulator
15+
16+
The Mapbox Android SDK requires Android 4.0.3+ (API level 15+).
17+
18+
If you want to run the test app in the emulator, we recommend the x86 build because it will run a lot faster.
19+
20+
First ensure you have an `MAPBOX_ACCESS_TOKEN` environment variable set, as described below. Then, create an x86 build:
21+
22+
make android-lib-x86
23+
24+
In Android Studio, create an x86 AVD (Android Virtual Device):
25+
26+
- Open AVD Manager via the Tools menu -> Android -> AVD Manager
27+
- Click "Create Virtual Device" at the bottom on AVD Manager window
28+
- Select one of the device profiles, for example the Nexus 4
29+
- Click "Next"
30+
- Select a Lollipop or Kitkat release with ABI of x86. If the line is greyed out click Download to download the OS files.
31+
- Click "Next"
32+
- Under "Emulated Performance" check "Host GPU" and uncheck "Store a snapshot for faster startup"
33+
- Click "Finish"
34+
- Close the AVD Manager
35+
36+
Now when you run or debug the Android project you will see a window "Choose Device". Select your new AVD from drop down under "Launch emulator". If you select "Use same device for future launches" Android Studio will remember the selection and not ask again.
37+
38+
## Running Mapbox GL Native on a hardware Android device
39+
40+
The Mapbox Android SDK requires Android 4.0.3+ (API level 15+).
41+
42+
First read the [Google documentation](http://developer.android.com/tools/device.html) to set up your device and your OS to connect to the device.
43+
44+
When you plug your device in and then run or debug the Android project you will see a window "Choose Device". Choose your device from the "Choose a running device" list.
45+
46+
If your device does not show up, double check the [Google documentation](http://developer.android.com/tools/device.html).

docs/DEVELOP_IOS_OSX.md platform/ios/DEVELOPING.md

+6-8
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,14 @@
1-
# Developing for iOS on OS X
1+
# Contributing to the Mapbox iOS SDK
22

3-
This process gives you a native iOS app for testing changes to mapbox-gl-native
4-
on a simulator or device. Normally production use of the library is via a
5-
precompiled binary linked into the app target: this process instead compiles
6-
Mapbox GL Native from source along with your application, so it can include
7-
latest development and your own modifications.
3+
This document explains how to build the Mapbox iOS SDK and the osxapp demo application for the purpose of developing the SDK itself.
84

9-
Developing for iOS implies an OS X host system.
5+
### Requirements
6+
7+
The Mapbox iOS SDK and iosapp demo application build against the iOS 7.0 SDK and require Xcode on a computer running OS X.
108

119
### Build
1210

13-
Run
11+
[Install core dependencies](../../INSTALL.md), then run
1412

1513
make iproj
1614

docs/BUILD_IOS_OSX.md platform/ios/INSTALL.md

+12-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,19 @@
1-
# Building Mapbox GL Native for iOS
1+
# Integrating the Mapbox iOS SDK into your application
22

3-
This section is for people contributing to Mapbox GL directly in the context of their own app.
3+
This document explains how to build a development version of Mapbox iOS SDK for the purpose of incorporating it into your own Cocoa Touch application.
4+
5+
### Requirements
6+
7+
The Mapbox iOS SDK and iosapp demo application build against the iOS 7.0 SDK. They are intended to run on iOS 7.0 and above on the following devices and their simulators:
8+
9+
* iPhone 4S and above (5, 5c, 5s, 6, 6 Plus)
10+
* iPad 2 and above (3, 4, Mini, Air, Mini 2, Air 2)
11+
* iPod touch 5th generation and above
412

513
### Build
614

15+
1. [Install core dependencies](../../INSTALL.md).
16+
717
1. Install [appledoc](http://appledoc.gentlebytes.com/appledoc/) for API docs generation.
818

919
```

platform/ios/README.md

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# [Mapbox iOS SDK](https://www.mapbox.com/ios-sdk/)
2+
3+
[![Bitrise](https://www.bitrise.io/app/7514e4cf3da2cc57.svg?token=OwqZE5rSBR9MVWNr_lf4sA&branch=master)](https://www.bitrise.io/app/7514e4cf3da2cc57)
4+
5+
A library based on [Mapbox GL Native](../../README.md) for embedding interactive vector maps into Cocoa Touch applications on iOS 7.0 and above using Objective-C, Swift, or Interface Builder.
6+
7+
This repository is for day-to-day development of the SDK. Building the SDK yourself requires [a number of dependencies and steps](../../INSTALL.md) that are unnecessary for developing production applications. For production applications, please consider installing an official, prebuilt release instead; see the [Mapbox iOS SDK website](https://www.mapbox.com/ios-sdk/) for installation instructions.
8+
9+
* [Integrating the Mapbox iOS SDK into your application](INSTALL.md)
10+
* [Contributing to the Mapbox iOS SDK](DEVELOPING.md)
11+
12+
![](../../ios/screenshot.png)

docs/DEVELOP_LINUX.md platform/linux/README.md

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Linux
22

3+
A simple map application and test suite for Linux based on [Mapbox GL Native](../../README.md) and [GLFW](https://github.com/glfw/glfw).
4+
35
We are using Ubuntu for development. While the software should work on other distributions as well, we are not providing explicit build instructions here.
46

57
This process gives you a Linux desktop app built on a Linux host system.

platform/node/DEVELOPING.md

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Developing the Mapbox GL Native Node.js module
2+
3+
This document explains how to build the [Node.js](https://nodejs.org/) bindings for [../../README.md](Mapbox GL Native) for contributing to the development of the bindings themselves. If you just want to use the module, you can simply install it via `npm`; see [README.md](README.md) for installation and usage instructions.
4+
5+
## Building
6+
7+
To develop these bindings, you’ll need to build them from source. Building requires [installing all of the basic dependencies needed for Mapbox GL Native](../../INSTALL.md), then running:
8+
9+
npm install --build-from-source
10+
11+
From the root directory. This will compile the Node.js bindings and install module dependencies.
12+
13+
To recompile just the C++ code while developing, run `make node`.
14+
15+
To create an Xcode project and use a GUI debugger in the case of a crash, run `make xnode`.
16+
17+
## Testing
18+
19+
To test the Node.js bindings:
20+
21+
```
22+
npm test
23+
```
24+
25+
To run the visual render test suite:
26+
27+
```
28+
npm run test-suite
29+
```

platform/node/README.md

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# node-mapbox-gl-native
22

3-
[![NPM](https://nodei.co/npm/mapbox-gl-native.png)](https://npmjs.org/package/mapbox-gl-native)
3+
[![NPM](https://nodei.co/npm/mapbox-gl-native.png)](https://npmjs.org/package/mapbox-gl-native)
4+
[![Travis](https://travis-ci.org/mapbox/mapbox-gl-native.svg?branch=master)](https://travis-ci.org/mapbox/mapbox-gl-native/builds)
45

56
## Installing
67

@@ -245,3 +246,7 @@ map.render({}, function(err, image) {
245246
});
246247

247248
```
249+
250+
## Contributing
251+
252+
See [DEVELOPING.md](DEVELOPING.md) for instructions on building this module for development.

platform/osx/DEVELOPING.md

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Contributing to the Mapbox OS X SDK
2+
3+
This document explains how to build the Mapbox OS X SDK for contributing to the development of the SDK itself.
4+
5+
### Requirements
6+
7+
The Mapbox OS X SDK and the osxapp demo application run on OS X 10.10.0 and above.
8+
9+
### Build
10+
11+
1. [Install core dependencies](../../INSTALL.md).
12+
1. Run `make xproj`.
13+
1. Switch to the osxsdk or osxapp scheme. The former builds just the Cocoa framework, while the latter also builds a Cocoa demo application based on it.
14+
15+
### Access tokens
16+
17+
The demo applications use Mapbox vector tiles, which require a Mapbox account and API access token. Obtain an access token on the [Mapbox account page](https://www.mapbox.com/studio/account/tokens/). You will be prompted for this access token the first time you launch the demo application.
18+
19+
### Usage
20+
21+
Through the OS X SDK, the demo application supports a variety of standard gestures and keyboard shortcuts. For more details, open Mapbox GL Help from the Help menu.
22+
23+
You can also [integrate the Mapbox OS X SDK into your own Cocoa application](INSTALL.md).

docs/BUILD_OSX.md platform/osx/INSTALL.md

+11-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
1-
# Building Mapbox GL Native for OS X
1+
# Integrating the Mapbox OS X SDK into your application
22

3-
This project provides an OS X SDK analogous to the Mapbox iOS SDK. Mapbox does not officially support it to the same extent as the iOS SDK; however, bug reports and pull requests are certainly welcome. This document explains how to build the OS X SDK and integrate it into your own Cocoa application.
3+
This document explains how to build the Mapbox OS X SDK and integrate it into your own Cocoa application.
4+
5+
### Requirements
6+
7+
The Mapbox OS X SDK requires the OS X 10.10.0 SDK or above.
48

59
### Build
610

11+
1. [Install core dependencies](../../INSTALL.md).
712
1. Run `make xpackage`, which produces a `Mapbox.framework` in the `gyp/build/Release/` folder.
813

914
### Install
@@ -16,6 +21,10 @@ This project provides an OS X SDK analogous to the Mapbox iOS SDK. Mapbox does n
1621

1722
1. In a XIB or storyboard, add a Custom View and set its custom class to `MGLMapView`. If you need to manipulate the map view programmatically, import the `Mapbox` module (Swift) or `Mapbox.h` umbrella header (Objective-C).
1823

24+
## Use
25+
26+
The [Mapbox iOS SDK’s API documentation](https://www.mapbox.com/ios-sdk/api/3.0.1/) applies to the Mapbox OS X SDK with few differences, mostly around unimplemented features like user location tracking.
27+
1928
## Troubleshooting
2029

2130
You can also try clearing the Xcode cache with `make clear_xcode_cache`.

platform/osx/README.md

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Mapbox OS X SDK
2+
3+
[![Bitrise](https://www.bitrise.io/app/155ef7da24b38dcd.svg?token=4KSOw_gd6WxTnvGE2rMttg&branch=master)](https://www.bitrise.io/app/155ef7da24b38dcd)
4+
5+
A library based on [Mapbox GL Native](../../README.md) for embedding interactive vector maps into Cocoa applications on OS X 10.10.0 and above using Objective-C, Swift, or Interface Builder.
6+
7+
This SDK is analogous to the Mapbox iOS SDK, and much of the iOS SDK documentation applies here. Mapbox does not officially support the OS X to the same extent as the iOS SDK; however, bug reports and pull requests are certainly welcome.
8+
9+
* [Integrating the Mapbox OS X SDK into your application](INSTALL.md)
10+
* [Contributing to the Mapbox OS X SDK](DEVELOPING.md)

0 commit comments

Comments
 (0)