Tile Server

What is a Tile Server?

A Tile Server is software that can take a dataset that represents a map and deliver this dataset in a form of images or tiles, creating a visual map and the illusion of a single map on a browser. The real advantage of a Tile Server is for zooming in and out on maps. The level of detail increases the more you zoom in. Google Maps is powered by a Tile Server.

The Tile Server just serves up the map, and is pretty useless without the accompanying dataset or map data. Fortunately for us, OpenMapTiles.org provides a free Tile Server and a free map datasets. So, we can download the software and the maps and store them in Molly. This provides us access to high detail maps covering the entire world, which we can view even when not connected to the Internet.

Molly is not always connected to the internet, but with our locally hosted Tile Server and map data, we are always able to look at maps. Allowing us to review our recent adventures or plan upcoming ones.

Why we need a Tile Server

Well, maybe we don’t, but it is certainly nice to have. We could do most of what we want to do with the maps loaded onto iPads.

Our Traccar GPS tracking software which tracks Molly’s location has been modified to use the locally hosted Tile Server, and not the default one that requires an Internet connection. A similar modification was made to the Grafana Track Map Panel, and again uses the the locally hosted Tile Server.

We have some excellent iPad applications with mapping software, but none of them contain detail maps of the entire world. The Open Street Map for the entire world is a huge dataset, and is over 50GBs in size. Having the complete dataset in one place means we can look up some details in New Zealand while being off-grid in Nevada. Or we can plan ahead without needing to worry about downloading maps for the next country.

Setting Up the Tile Server

Turns out setting up a Tile Server is actually quite easy. There are very good instructions at Open Map Tiles.

In our case we choose to host the Tile Server on our computer using docker. The docker image we used was klokantech/tileserver-gl and the map dataset was osm-2017-07-03-v3.6.1-planet.mbtiles.

Setting Up the Tile Server on a Synology NAS

In the future we may host the Tile Server and map datasets on a NAS. The NAS has much more storage for the large map dataset files. Unfortunately the NAS we have at the moment in Molly is not powerful enough to run docker images. So an upgrade of the NAS is likely.

We set up a Tile Server on our home NAS. It was easy and worked well.

  • Within the Docker application, get the map tiler image by searching in the Registry for ‘tileserver’. Then download the latest tag of klokantech/tileserver-gl
  • Map port 80 to port 8080, or any other unused port.
  • Add a volume to store the map data.
  • The map data can be retrieved from various sources, and we choose the worldwide OSM map (osm-2017-07-03-v3.6.1-planet.mbtiles).

Map served locally