This is a tricky one: We are storing a lambda at the member variable `transitionFrameFn` and capturing `this` at this lambda function. At some point when running the callback, we set `transitionFrameFn` to `nullptr`, effectively destroying the callback that is being executed. After this point, `this` is no longer valid, as the memory gets cleared and it might point to the correct location (or not). That is why it works on some compilers but not on g++ 5.3.1. Touching any `this->[smth]` is undefined after that. The fix is just move `transitionFrameFn = nullptr` to the last thing we do on the callback. This behaves similarly to calling `delete this` on a class method.
Mapbox GL Native
A library for embedding interactive vector maps into native applications on multiple platforms. It takes stylesheets that conform to the Mapbox GL Style Specification, applies them to vector tiles that conform to the Mapbox Vector Tile Specification, and renders them using OpenGL. Mapbox GL JS is the WebGL-based counterpart, designed for use on the Web.
The Mapbox GL ecosystem
This repository hosts the cross-platform Mapbox GL Native library, plus convenient SDKs for several platforms. The cross-platform library comes with a GLFW-based demo application for Ubuntu Linux and OS X. The SDKs target the usual languages on their respective platforms:
| SDK | Languages | Build status |
|---|---|---|
| Mapbox GL Native | C++14 | |
| Mapbox Android SDK | Java | |
| Mapbox iOS SDK | Objective-C or Swift | |
| Mapbox OS X SDK | Objective-C or Swift | |
| node-mapbox-gl-native | Node.js |
Additional Mapbox GL Native–based libraries are developed outside of this repository:
- React Native Mapbox GL for React Native applications on iOS and Android
- QMapboxGL for Qt-based applications
- Telerik’s Mapbox plugin for Apache Cordova applications
If your platform or hybrid application framework isn’t listed here, consider embedding Mapbox GL JS using the standard Web capabilities on your platform.