Skip to content

Commit

Permalink
fixed styles and fonts in maputnik being undocumented
Browse files Browse the repository at this point in the history
  • Loading branch information
CommanderStorm authored Jul 13, 2024
1 parent 8a9fa18 commit 9afbdcd
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions map/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ You can use it to edit the style and see the changes live.

> [!NOTE]
> Maputnik is not fully compatible with tileserver-gl
> Maputnik expects the data on an url, tileserver-gl expects it to be a file.
> For maputnik to accept the file, you need to do the following:
> Maputnik expects the data on urls, tileserver-gl expects it to be files.
> For maputnik to accept the files, you need to do the following:
```diff
"openmaptiles": {
Expand All @@ -90,6 +90,15 @@ You can use it to edit the style and see the changes live.
},
```

```diff
},
- "sprite": "{style}",
- "glyphs": "{fontstack}/{range}.pbf",
+ "sprite": "https://nav.tum.de/maps/styles/{style}/sprite",
+ "glyphs": "https://nav.tum.de/maps/fonts/{fontstack}/{range}.pbf",
"layers": [
```

To edit the style you thus need to run maputnik and tileserver-gl at the same time.
Change the style to the version maputnik expects.
You cannot preview the style in tileserver-gl, but you can see the changes in maputnik.
Expand Down

0 comments on commit 9afbdcd

Please sign in to comment.