5

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?

thewaywewere
  • 8,128
  • 11
  • 41
  • 46
  • How can we help you find what's wrong with your code if we can't see your code? – Mozahler Apr 20 '18 at 13:51
  • 2
    There is no code. I have a file generated by Maputnik that I need to insert into the running server configuration but don't know how. That is my question. – user7395921 Apr 21 '18 at 16:51

1 Answers1

5

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

cocorossello
  • 1,289
  • 1
  • 17
  • 30
  • i did the suggested and got the new styles listed on the landing page but when didnt yield any new style maps. All i did was make a copy of the klokantech-basic.GL and changed the color of all water bodies to red color, but no help. what should be done to get the maps with the style. btw, i did commit and restart the container – Raveen Beemsingh Dec 13 '18 at 09:59
  • Did you add the style.json to /data/styles directory? You have to add it – cocorossello Dec 13 '18 at 10:14
  • i did, only the thumbnail on the dashboard shows the red seas but not the full maps, not sure what the issue is – Raveen Beemsingh Dec 19 '18 at 07:36
  • 1
    @RaveenBeemsingh Did you by any chance manage to resolve this? I'm having the same issue – Hirad Roshandel May 12 '20 at 17:17