4

I'm setting up a custom tile server using OpenstreetMaps and Mapnik. I've been able to successfully setup the server and serve tiles using it. I'm using the OSM-Bright style right now.

I would like to use the MapBox Streets style or a custom style built on MapBox Studio with this server. I tried uploading the custom style to the server and pointed the XML directive in renderd.conf to the project.xml in my style. I cleared the cache and restarted renderd and apache but the new style does not render. There are no errors or warnings in the log.

Is there something I might be missing or a tutorial somewhere which I can follow to do this?

  • did you figure how to make this work? I'm looking for the exact same thing. Thanks! – jasondinh Oct 14 '16 at 18:38
1

MapBox Studio creates and edits CartoCSS style-sheets, and mapnik uses their own SLD xml styles. Here is a small info about CartoCSS https://github.com/mapbox/carto

Magic actually happened in this line:

carto project.mml > mapnik.xml

If you still can't get output form mapnik, run renderd with -f option, which will bring it in foreground and you will get some debug output.

0

There's possibly a couple of things going on here:

  1. If you're using the default style then you'll be loading the vector data from Mapbox. You'll probably want to be using a local datasource which is harder to setup (in comparison to Tilemill) but not impossible

  2. If you are using a local tile source, then you'll need to edit the mapnik XML first - mapbox studio separates the style from the layer definitions, so you'll need to merge them together into a single mapnik config file. The data layers are defined in the tm2source directory and you'll need to find the corresponding references in the style and replace the layer definitions. I do have an example of this but I'm not on my own machine at the moment.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.