Tuesday, March 7, 2017

Playing with Mapbox Vector Tiles (Part 2 - Generating custom tiles)

Part 1. End-to-End experiment
Part 2. Generating custom tiles
Part 3. Using Mabox GL

On my previous post I've played around with various tools on the Mapbox vector tiles ecosystem. On this post I'm taking it further: generating my own vector tiles.

There are various options to generate vector tiles:
  • using a server that generates the vector tiles dynamically based on other data (such as PostGIS)
  • programatically generating the protobuf (rolling your own code or using existing libs)
  • using a tool that receives various inputs and outputs the corresponding vector tiles, which can then be used as shown on my previous post
Most options for these approaches are properly identified at this page: https://github.com/mapbox/awesome-vector-tiles

On this post I'm going to focus on this third option, particularly using a tool from Mapbox called Tippecanoe. I'm not an expert on any of these alternatives (I'm learning as I'm writing this post) but Tippecanoe seems incredibly robust, including a great deal of customisation options when generating the tiles.