Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to customize map style in openmaptiles server

I'm trying to apply my custom map style to an evaluation version of OpenMapTile server (klokantech/openmaptiles-server) on Linux which is running in Docker.

I used the online version of Maputnik to edit the map in OSM-Bright style. Then I downloaded the modified JSON but I'm not sure how to apply this custom style to the my OpenMapTile server.

I logged into the Linux in Docker container and found the corresponding style.json file, but my changes applied will be lost whenver the container is restarted. Could anyone tell what am I missing?

like image 823
user7395921 Avatar asked Apr 20 '18 13:04

user7395921


People also ask

How do you edit a map style?

In the Google Cloud Console, go to the Map Styles page. Select the style you want, and click Customize Style.

What is Maputnik?

Maputnik is a free and open source visual editor for the Mapbox GL style specification. You can either use the online version of Maputnik at https://maputnik.github.io/editor or download the editor to use it locally.


1 Answers

In the /data/config.json file add your json file:

{
  "styles": {
    "standard": [
      "dark-matter",
      "klokantech-basic",
      "osm-bright",
      "positron"
    ],
    "custom": [
      "style.json",
    ....

And place that file in /data/styles. You need to restart the container after

like image 142
cocorossello Avatar answered Oct 02 '22 19:10

cocorossello