Skip to main content

Posts

Showing posts with the label MBTiles

Exploring the MapBox stack: MBTiles, TileJSON, UTFGrids and Wax

In my last blog post , we created a population density map of New Zealand using QGIS, SQLite and TileMill. Today, we’re going to publish this map to the web using various MapBox inventions. I'll also show you how to publish an interactive TileMill map on your own web server using some PHP and JavaScript wizardry.  I love MapBox . The team behind this platform has created a series of new specifications, allowing us to create fast, good looking and interactive maps. The downside is the limited support for other map projections than Web Mercator. TileMill allows you to add legends and tooltips to your maps. I’ve added a legend to my population density map with a HTML snippet describing the map and the color scale. The tooltip shows when the user hovers over or clicks on the map. It allows us to show dynamic content - additional data, images, charts - for each map feature. I want to show the name, total population, area and population density for each feature: The d...

Mapping New Zealand: Exporting tiles from TileMill

I wanted to publish a tiled version of my New Zealand maps. I first tried to upload my maps directly to MapBox.com from TileMill, but their free plan (50 MB upload storage) was not enough for all my zoom levels. This blog post describes an alternative, and a bit more complicated, way to publish your maps from TileMill. TileMill uses a clever format called MBTiles . This is an open specification from MapBox capabale of storing millions of tiles in a single SQLite database. You can download your maps as MBTiles from the TileMill interface. This was easy to do for my topographic map , and a bit more tricky for my seafloor map which crosses the antimeridian . TileMill don't allow you to select an area for export which crosses the antimeridian, without making a full roundrip around the Earth: Almost 45,000 tiles are needed to cover this big area for zoom level 0 to 9, while only 4700 tiles are needed to cover the area with data. Although TileMill has support for reduntant tile...