Mapbox GL

From OpenStreetMap Wiki
Jump to: navigation, search
Available languages — Mapbox GL
· Afrikaans · Alemannisch · aragonés · asturianu · Aymar aru · azərbaycanca · Bahasa Indonesia · Bahasa Melayu · bamanankan · Bân-lâm-gú · Basa Jawa · Basa Sunda · Baso Minangkabau · bosanski · brezhoneg · català · čeština · corsu · dansk · Deutsch · eesti · English · español · Esperanto · estremeñu · euskara · français · Frysk · Gaeilge · Gàidhlig · galego · Hausa · hrvatski · Igbo · interlingua · Interlingue · isiXhosa · isiZulu · íslenska · italiano · Kiswahili · Kreyòl ayisyen · kréyòl gwadloupéyen · Kurdî · Latina · latviešu · Lëtzebuergesch · lietuvių · Limburgs · magyar · Malagasy · Malti · Nederlands · Nedersaksies · norsk bokmål · norsk nynorsk · occitan · Oromoo · oʻzbekcha/ўзбекча · Plattdüütsch · polski · português · română · shqip · slovenčina · slovenščina · Soomaaliga · suomi · svenska · Tagalog · Tiếng Việt · Türkçe · Türkmençe · Vahcuengh · vèneto · walon · Wolof · Yorùbá · Zazaki · isiZulu · српски / srpski · авар · Аҧсшәа · башҡортса · беларуская · български · қазақша · Кыргызча · македонски · монгол · русский · тоҷикӣ · українська · Ελληνικά · Հայերեն · ქართული · नेपाली · भोजपुरी · मराठी · संस्कृतम् · हिन्दी · অসমীয়া · বাংলা · ਪੰਜਾਬੀ · ગુજરાતી · ଓଡ଼ିଆ · தமிழ் · తెలుగు · ಕನ್ನಡ · മലയാളം · සිංහල · བོད་ཡིག · ไทย · မြန်မာဘာသာ · ລາວ · ភាសាខ្មែរ · ⵜⴰⵎⴰⵣⵉⵖⵜ · አማርኛ · 한국어 · 日本語 · 中文(简体)‎ · 中文(繁體)‎ · 吴语 · 粵語 · ייִדיש · עברית · اردو · العربية · پښتو · سنڌي · فارسی · ދިވެހިބަސް
Mapbox Maps SDK
Screenshot of Mapbox Maps SDK
Author: Mapbox
License: BSD
Platforms: Android, iOS, Linux, macOS, Node.js, Qt, React Native, and Web
Version: Varies by platform
Language: many
Website: https://www.mapbox.com/maps/
Install:
Source code: https://github.com/mapbox/mapbox-gl-js/
Programming languages: AppleScript, C++, Java, JavaScript, Kotlin, Objective-C, and Swift

Embed customizable, interactive vector maps in Web, mobile, and desktop applications

The Mapbox Maps SDK is a suite of open-source libraries developed by Mapbox for embedding customizable slippy maps in Web, mobile, and desktop applications. There is also a library for building server-side or command-line rendering tools.

The Mapbox Maps SDK is based on the Mapbox GL renderer, which takes stylesheets that conform to the Mapbox Style Specification, applies them to vector tiles that conform to the Mapbox Vector Tile Specification via TileJSON manifests, and renders them dynamically using OpenGL for high performance. By default, Mapbox GL displays Mapbox Streets vector tiles based on OpenStreetMap data. The developer can choose among several Mapbox-designed styles or design a custom style in the graphical style editor of Mapbox Studio.

On mobile platforms, the Mapbox Telemetry component uses the device's location data to facilitate improvements to OpenStreetMap data.

Mapbox GL also powers the Mapbox Static API, which produces static map images on the server side for situations where interactivity is unnecessary or impractical. Mapbox Studio supports high-resolution printing based on Mapbox GL. The Mapbox Maps SDK for Android and iOS is the basis of the Mapbox Navigation SDK for Android and iOS.

Libraries

The Mapbox Maps SDK is available as a freely downloadable library on a number of platforms. Version numbers vary by platform. The following libraries are officially supported by Mapbox, except for the macOS SDK. The macOS SDK is community-maintained, although it shares the majority of its code with the Mapbox-developed iOS SDK. The Android, iOS, macOS, Qt, and Node libraries are collectively referred to as “Mapbox GL Native”, since they target native platform technologies via compiled languages.

Library Platform Target languages Latest release
Mapbox GL JS Web JavaScript Download
Mapbox Maps SDK for Android Android Java, Kotlin Look for “android-”
Mapbox Maps SDK for iOS iOS Objective-C, Swift, Interface Builder Look for “ios-”
Mapbox Maps SDK for macOS macOS Objective-C, Swift, Interface Builder, AppleScript Look for “macos-”
Mapbox Maps SDK for Qt Qt (including Windows) C++03, QML Look for “qt-”
node-mapbox-gl-native Node.js JavaScript Look for “node-”
React Native Mapbox GL React Native JavaScript npm

The Qt Location API in Qt 5.9 and the Qt Automotive Suite includes a Mapbox GL geoservices plugin based on the Mapbox Maps SDK for Qt. The Mapbox Maps SDK for Unity and the Mapbox SceneKit SDK are not based on Mapbox GL but nonetheless support many of the same technologies.

Some compatibility libraries for hybrid application toolkits are contributed by Telerik and other members of the Mapbox developer community:

The following plugins embed Mapbox GL JS in virtual reality scene graphs:

The following plugins embed Mapbox GL JS in prototyping environments:

The following plugins embed Mapbox GL JS in analysis environments:

The Mapbox GL–powered Mapbox Static API is available through the following client-side libraries:

  • Mapbox Java SDK (com.mapbox.api.staticmap package) in Java SE and on Android
  • MapboxStatic.swift in Swift, Objective-C, and AppleScript on iOS, macOS, tvOS, and watchOS

Features

The Mapbox Maps SDK's feature set varies by platform. In general, rendering features are added to Mapbox GL JS first then ported to the native SDKs, while smartphone-centric features tend to be specific to the native SDKs.

This table was last updated 22:24, 1 May 2018 (UTC).

Feature JS Android iOS macOS Qt node.js
OSM base map yes yes yes yes yes yes
Terrain base map yes yes yes yes yes yes
Satellite base map yes yes yes yes yes yes
Custom styles yes yes yes yes yes yes
High-resolution rendering (Retina) yes yes yes yes yes yes
Continuous zooming yes yes yes yes yes yes
Rotation yes yes yes yes yes yes
Perspective (tilt, pitch) yes yes yes yes yes yes
Axonometric (orthographic, skewed) projection no No yes
Localized labels Optional[a 1] no[a 2] yes yes no[a 3] no[a 3]
3D building extrusion yes yes yes yes yes yes
Styleable DEM terrain yes yes yes yes yes Unreleased
Heat maps yes yes yes yes yes Unreleased
Viewport animation yes yes yes yes yes N/A
Multitouch gestures partial yes yes yes yes N/A
Keyboard shortcuts yes yes No yes N/A N/A
Markers (point annotations) yes yes yes yes yes no
Marker views (view-backed annotations) yes yes[a 4] yes No no no
Marker keyframe animation no yes[a 4] yes No no N/A
Shape overlays (shape annotations) no yes yes yes yes no
Arbitrary GeoJSON yes yes yes yes yes yes
GeoJSON point clustering yes yes yes yes no yes
Popups (callouts, popovers, info windows) yes yes yes yes no N/A
Tooltips no N/A N/A yes no N/A
Georeferenced images yes yes yes yes yes yes
Embedded video yes No N/A
User location (user dot) yes yes yes No no N/A
Customizable user dot yes yes yes no no N/A
User location tracking (GPS tracking) yes yes yes N/A N/A N/A
Telemetry no Optional Optional no no no
Offline maps no yes yes yes yes no
WMS yes yes yes yes yes yes
TMS yes yes yes yes yes yes
Attribution control yes yes yes yes yes no
Scale control yes No yes no no no
Localized UI no yes yes yes no N/A
Bidirectional (right-to-left) text Optional yes yes yes yes yes
Complex text shaping Optional[a 5] partial[a 5] partial[a 5] partial[a 5] partial[a 5] partial[a 5]
Vertical CJK text yes yes yes yes yes yes
Data-driven styling (property expressions) yes yes yes yes Partial[a 6][a 7]
Style introspection (runtime styling) yes yes yes yes partial yes
Data introspection (feature eventing, feature querying) yes yes yes yes no partial[a 8]
Screenreader support (accessibility) Optional[a 9] partial yes No no N/A
Text scaling (Dynamic Type) no no In progress no no
Static snapshots no yes yes yes no yes
Printing no yes No yes no N/A
IDE integration (code completion, documentation) no yes yes yes yes no
Dash docset no No yes yes no no
  1. Via the Mapbox GL Language plugin.
  2. A plugin is available, but it is incompatible with the latest map SDK release.
  3. 3.0 3.1 No built-in option, but a specific language can be specified by the style or application using runtime styling.
  4. 4.0 4.1 Soon to be deprecated.
  5. 5.0 5.1 5.2 5.3 5.4 5.5 Arabic and Hebrew only.
  6. Expressions are not yet supported.
  7. Data-driven styling at runtime is not yet supported.
  8. Queries rendered features only. Source feature querying is not yet implemented.
  9. Via the Mapbox GL Accessibility plugin.

You can track the effort to ensure feature parity between the various platforms:

The GL JS roadmap lists current and upcoming priorities for Mapbox GL JS and, by extension, the other SDKs.

History

Originally, Mapbox developed raster map libraries: mapbox.js for the Web; the Mapbox iOS SDK, based on Route-Me; MBXMapKit, based on Apple’s MapKit framework, also for iOS; and the Mapbox Android SDK. Over time, Mapbox has deprecated these libraries in favor of vector map libraries.

Mapbox GL JS was introduced in August 2014. An Android port began in January 2014, followed by a preview of an iOS port that June. Mapbox GL for iOS officially launched in May 2015 before being renamed “Mapbox iOS SDK”. The Mapbox Android SDK launched in October 2015. React Native Mapbox GL began in December 2015 as an experimental project.

The Mapbox Qt SDK and Mapbox OS X SDK launched in May 2016; the latter was renamed “Mapbox macOS SDK”. In June 2017, the Mapbox Qt SDK was incorporated into Qt 5.9 and the Qt Automotive Suite as the “Qt Location Mapbox GL plugin”. [1] React Native Mapbox GL relaunched as an official Mapbox product in September 2017. The Android, iOS, macOS, and Qt SDKs were renamed to the “Mapbox Maps SDK” in November and December 2017.

Telemetry

The Mapbox Maps SDK for Android and iOS features Mapbox Telemetry, a component that sends the user's location to Mapbox servers in anonymized, aggregated form. This data is either collected at all times or while the application is in use, depending on the application's configuration. Mapbox uses the collected location data for the purpose of:

  • Helping the Mapbox Data Team target improvements to OpenStreetMap where they're most needed. For example, if a high volume of location data points indicates that drivers consistently avoid turning left at a given intersection, the team can enter a turn restriction into OpenStreetMap with greater confidence.
  • Powering OpenStreetMap-based maps that indicate traffic congestion and OSRM-powered directions that avoid traffic congestion, helping OpenStreetMap-based maps achieve feature parity with maps based on proprietary data sources.

The SDKs provide an option for privacy-conscious end users to turn off Mapbox Telemetry at any time. More information about Mapbox Telemetry, including how Mapbox uses this data while protecting users' privacy and minimizing battery usage.

External links