7

I have created a Ubuntu 14.04 tile server. I loaded an OSM base map into the POSTGIS database and created a slippy-map using OpenLayers 3.9. Then I loaded data of an overlay into the POSTGIS database and now I am trying to create a layer for it.

To create layers, the only solution with decent documentation seems to be Tilemill. But to use Tilemill on my server I have to use "SSH connection forwarding", explained here. I don't want to create a security leak into my server.

Are there any other options, with decent documentation, with which I can create custom layers for my map?

What I already 'know':

  • Create a simple map with Mapnik

  • Store shape files into the POSTGIS database

  • Use OpenLayers to display the layer

What I need to know: I have a simple overlay (created with Mapnik): enter image description here

This overlay has to be rendered into different tiles and have zoom levels, just like a OSM base map. I want to use this overlay and put it over an area on my OSM-tiled map.

What do I need to be able to create a layer that can be displayed with OpenLayers like: url: '/overlay/{x}/{y}/{z}'?

2
  • Noone that can help me on my way?
    – PIDZB
    Commented Nov 30, 2015 at 9:04
  • any success with your tiling? I need to achieve more or less the same thing. Commented Aug 8, 2016 at 23:57

1 Answer 1

5

This page has an awesome tutorial on how to create a complete Tile server using the stack Mod_tile, renderd, mapnik, osm2pgsql, and a PostgreSQL/PostGIS database.

If you already have a style created by the Tilemill you can export to the Mapnik format and use it to generate your tiles and render with frameworks like OpenLayers and Leaflet.

9
  • 1
    Thank you for your reaction. I already used this guide to create a tile server, and it works great. What I don't know is how to exactly use these components with my own custom data..
    – PIDZB
    Commented Jan 8, 2016 at 12:56
  • Where's your custom data? In a postgis database?
    – valdeci
    Commented Jan 8, 2016 at 13:03
  • Yes, I receive a shape-file that I insert into the POSTgis database.
    – PIDZB
    Commented Jan 8, 2016 at 13:49
  • I don't understand your problem. If you already imported the shapefile to a postgis database, you created a style with the tilemill tool, you exported to a mapnik.xml file and also used the guide to create a tile server using the created mapnik style. Where's your problem? With a running tile server you can simply call the desired URL: '/overlay/{x}/{y}/{z}
    – valdeci
    Commented Jan 8, 2016 at 14:21
  • 2
    great! i needed this info.
    – tony gil
    Commented May 7, 2016 at 19:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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