Use queryPointAnnotations to drive annotation view updates - Get sets of visible and offscreen annotations using the mbgl query mechanism and updates and enqueues as required - Query viewport adjusted if tilted (avoid apparent issue with queryPointAnnotations when the query box is larger than the actual viewport) - Add a small debugging display in iOS app to see annotations going in and out of the reuse queue This also works around a performance issue that made getting an annotation context expensive by implementing a map of annotations to tags. It works around another issue with the underlying mbgl query so that even if it (rarely) returns an incorrect result, the correct visual effect still occurs and the reuse queue is added to and drained as expected. Finally, this refactors MGLMapView viewForAnnotation: to use the maps to access the requested annotation context and view. This avoids a more expensive lookup done previously. Along for the ride: sync up the ios and macos names (and types) for MGLAnnotationTagContextMap
Mapbox GL Native
A library for embedding interactive, customizable vector maps into native applications on multiple platforms. It takes stylesheets that conform to the Mapbox 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 macOS. 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 macOS SDK | Objective-C, Swift, or AppleScript | |
| node-mapbox-gl-native | Node.js | |
| Mapbox Qt SDK | C++03 |
Additional Mapbox GL Native–based libraries for hybrid applications are developed outside of this repository:
| Toolkit | Android | iOS | Developer |
|---|---|---|---|
| React Native (npm) | ✅ | ✅ | |
| Apache Cordova (npm) | ✅ | ✅ | Telerik |
| NativeScript (npm) | ✅ | ✅ | Telerik |
| Xamarin | ✅ | ✅ | Xamarin |
If your platform or hybrid application framework isn’t listed here, consider embedding Mapbox GL JS using the standard Web capabilities on your platform.