Search icon
Subscription
0
Cart icon
Close icon
You have no products in your basket yet
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Mapbox Cookbook

You're reading from  Mapbox Cookbook

Product type Book
Published in Mar 2016
Publisher
ISBN-13 9781784397357
Pages 264 pages
Edition 1st Edition
Languages

Table of Contents (13) Chapters

Publishing your base map on your server with Node.js


As we explained in the previous chapter, PHP is not the ideal technology to use to serve our tiles. This is not because PHP is a bad language or anything similar; it's because there are other technologies that excel in multithreading operations, which is exactly what's needed when serving tiles at an enormous speed.

In this recipe, we will use TileStream, which is a high-performance tile server powered by MBTiles. TileStream is maintained by Mapbox and uses Node.js and SQLite as the backend technologies.

In the preceding PHP recipe, we converted the tiles to the XYZ format to squeeze out any performance benefits while serving the tiles. Node.js doesn't have any performance issues while reading the tiles directly from the MBTiles container, which is just a SQLite database, so we don't need to convert the tiles in this case.

We can use the MBTiles we exported in the previous recipe. Then we will download TileStream from GitHub, which is the...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}