mapbox-android-demo icon indicating copy to clipboard operation
mapbox-android-demo copied to clipboard

Offline map font problem (no documentation either).

Open alexwyattdev opened this issue 5 years ago • 0 comments

In our app, we need to download an Offline region and later in the app we need to use "Roboto Medium" as a font on a dynamic symbol layer.

Currently there is no documentation on how it can be done to add Roboto Medium to the offlineManager, so it is ready to display when there is no internet later in the app.

We are using the mapbox-light-v10 style.

I tried to add a style JSON from a hosted URL to the OfflineTilePyramidRegionDefinition, but it either gives back 405, or 410 errors. There are no usable documentations on how to properly set up a json style, so what I could gather from here and there it looks like this: I am unsure about version code, and the glyph font usage, and I don't know why we need to define a layer, but it seems so random to add "water". We need a complete map (Style.LIGHT), just with Roboto Medium as an offline-available font.

{
  "version": 10,
  "sources": {
    "mapbox-light": {
      "type": "vector",
      "url": "mapbox://styles/mapbox/light-v10"
    },
  "glyphs": "mapbox://fonts/mapbox/Roboto-Medium/255.pbf"
  },
  "layers": [
  {
    "id": "water",
    "source": "mapbox-light-v10",
    "source-layer": "water",
    "type": "fill",
    "paint": {
      "fill-color": "#00ffff"
    }
  }
]
}

And the other problem is, that there are some tickets around this, but all of them were closed.

alexwyattdev avatar Sep 10 '20 14:09 alexwyattdev