MapLibre GL Native: open-source mobile SDK for Android and iOS

Published June 4th, 2021

Maps SDK for Android and iOS

Introducing a new open-source map library for both Android and iOS - developed by MapTiler team in cooperation with Amazon, Facebook, Microsoft, and MapLibre community. With the MapLibre SDK, developers can write native applications for any mobile device. Community management ensures it stays free forever. 

Free alternative to Mapbox Maps SDKs

MapLibre Native is a library for mobile devices that allows developers to display vector maps in their applications. It is an alternative to Google Maps SDK for Android and Apple MapKit on iOS for developers who need advanced functionality like custom map styles, integrating their own business data, and more.

The need for an independent mobile SDK emerged when Mapbox decided to discontinue the development of open-source mobile map SDKs for Android & iOS in the middle of 2020. MapTiler took over the reins, in December 2020 forked the last version released under the OSS license, and soon released it under the MapLibre brand.

MapLibre Native is backward compatible with the latest open-source version of Mapbox SDK (therefore migration of your apps is a few lines of code change), however, there are things specific to MapLibre SDK:

  • Tracking of end-users (telemetry) has been removed
  • OSS license: community ownership ensures it stays open-source forever
  • Updated distribution model: the library is now distributed via the Maven Central repository for Android and as a Swift package for iOS
  • Optional usage of authorization: access token requirement depended on the map provider and its policy

Core Library

The native map SDKs for Android and iOS are built on top of the core C++ library (written in C++14) that powers customizable vector maps by taking stylesheets that conform to the Mapbox Style Specification, applying them to vector tiles, and rendering them using OpenGL or Metal.

The core library consists of essential components such as style object model with various layer types (raster, vector, hillshade, heatmap,…), map component, renderer, networking and threading support, storage and resource management, and offline caching. The renderer uses OpenGL ES 2.0 technology for pixel-perfect map design, from antialiased fonts to polygon blurring, all hardware-accelerated and optimized for mobile devices. The core library is designed for mobile and desktop platforms and shares OpenGL shaders with its counterpart designed for web - MapLibre GL JS - a JavaScript library that uses WebGL.

To make interactive maps available for native applications on Android and iOS, the core library is packaged into platform-specific SDK. Components from the core library are wrapped by adapters written in platform language (Objective C, Java, …) and exposed in the public API to application developers.

Building Apps for Android and iOS With MapLibre SDK

The MapLibre SDK for Android and iOS allows embedding interactive vector maps that conform to Mapbox style specification into any Android and iOS application where developers need customizable and interactive maps. The SDK along with MapTiler Cloud makes it possible to add additional layers, visualize 3rd party data, fine-tune maps graphical look and feel and implement rich interaction with users.

Android Developers

iOS Developers

Partnership with Amazon, Facebook, Microsoft, and the MapLibre community

The MapLibre community consists of many individuals and companies. MapTiler, Amazon, Facebook, and Microsoft are the most visible ones; Christian Sturm, Jukka Hietanen, Nuno Goncalves, Petr Pokorný, Rob Chohan, Szymon Ulewicz, Yuri Astrakhan count among the most active developers there.

iOS Metal supported and the future

Support for Metal Framework, Apple’s replacement of OpenGL and OpenCL in a single 3D graphic and shader API, is already available in beta version - thanks to great contributions from the Amazon engineers.

The team is also working on configuration improvements that will remove hardcoded Mapbox configuration and will expose the API for application developers to provide custom configuration if needed or to use predefined vector maps providers configuration, which comes with their standard styles so that the developer doesn’t need to look for exact URLs but use just the style name. The ability to fully configure the SDK is also removing obstacles in offline caching for non-mapbox maps in the original mapbox SDK, where non-mapbox resources were cached along with API keys and tile URL subdomains causing duplicates in the offline cache and other problems. Removing these issues will be possible because the backend URL, canonical-to-normalized URL conversion, templates for glyphs, sprites URLs, and so on will be fully configurable.

Share
Petr Pridal

Petr Pridal

CEO
Published on June 4th, 2021