Skip to content
Cartograph Maps

How to use MapLibre maps in Cartograph Maps

A MapLibre style is a file (JSON) that describes a map: where its data comes from and how each layer is drawn. Many map providers publish MapLibre styles. Cartograph Maps shows a MapLibre style as a raster map: the style is drawn into map images, which the app then shows like any other raster map. It works on Android, iPhone, iPad, macOS and Windows.

Vector styles (styles with vector sources, the usual kind) work too, but the app draws them as map images, tile by tile. You see the map as the style designs it, but not as a vector map app would show it:

  • Labels are part of the images. They turn with the map when you rotate it, are drawn again in each tile (a name can appear twice, or be cut at a tile edge) and grow or shrink while you zoom between zoom levels.
  • No 3D from the style: its 3D buildings and terrain are not shown in 3D.
  • Nothing to tap: roads, places and other features of the style can’t be selected or searched.

Styles with only raster sources (map images) are not affected: they are images already.

Add an online MapLibre map

  1. Open the map manager and the Online tab.
  2. Tap + → Special online maps → MapLibre.
  3. The map’s properties open. Enter the address of the style (the style.json URL, with the API key if the provider puts it in the address) in Server url.
  4. If the provider needs the key separately, enter it in API key (for a map that is already shown, tap Apply next to it). Most providers don’t need this field.
  5. Tap OK and load the map.

Add an offline MapLibre map

  1. Copy the style file (.json) and anything it uses into the app’s folder (see where maps are stored), for example into Offline maps.
  2. In the map manager, open the Offline tab and tap + → Special offline maps → MapLibre.
  3. In the properties, tap Replace next to Map file and choose the style file.
  4. Enter an API key only if the style needs one.
  5. Tap OK and load the map.

The style can use files in the app’s folder: put the tiles, sprites or fonts it references there and address them with asset://, which stands for the app’s folder. For example, with tiles in a folder mytiles in the app’s folder:

"tiles": ["asset://mytiles/{z}/{x}/{y}.png"]

Use folder names without spaces in these addresses.

A simple raster style

A minimal style with one raster source looks like this (replace the tile address with your provider’s):

{
  "version": 8,
  "sources": {
    "base": {
      "type": "raster",
      "tiles": ["https://tiles.example.com/{z}/{x}/{y}.png"],
      "tileSize": 256,
      "attribution": "© Example"
    }
  },
  "layers": [
    { "id": "base", "type": "raster", "source": "base" }
  ]
}

For a plain tile server you don’t need MapLibre: add it with Add custom online map (see Online maps).

What MapLibre maps can do

  • Opacity, Blending mode and Map effect like other raster maps (see Map layers).
  • Online MapLibre maps can be converted with Generate raster map and Create atlas (see How to convert a map to MBTiles); offline ones can’t.