Offline Style Package

To download the Offline Style Package, first you need to enable a feature flag.

  1. Open the Map Maker.
  2. Open the Settings menu > Lab Features.
  3. Enable the Offline Style Package flag.

After enabling the feature, you will see an additional download option in the Share dialog.

If you want your custom map styles and assets to be available offline, you can create an Offline Style Package and bundle it with your application.

The Offline Style Package is a solution for you if you want to:

  • Use your custom map style in mobile applications or vehicles with limited or no connectivity.
  • Reduce the number of requests and improve the map loading time.

How to download an Offline Style Package

Downloading Offline Style Package
  1. Go to the Map Maker and open the style you want to use offline.
  2. Click the Share button.
  3. Find the Download section and download the package with the zip file extension.

You can exclude fonts to reduce the package size. Remember to:

  • Include fonts in the initial download to to make sure offline styles renders correctly.
  • Download fonts for each style you want to use offline, since different styles may utilize different fonts.

Package contents

The Offline Style Package contains the following files:

1styles/
2-- styleId/
3---- style.json
4---- sprites/
5------ default/
6-------- sprite.png
7-------- sprite.json
8-------- sprite@2x.png
9-------- sprite@2x.json
10fonts/
11-- FontName/
12---- pbf/
13------ 0-255.pbf
14------ 256-511.pbf
15------ etc.pbf

Directory styleId matches style ID, which can also be found in the online style URL.