Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Mapbox Cookbook

You're reading from   Mapbox Cookbook Over 35 recipes to design and implement uniquely styled maps using the Mapbox platform

Arrow left icon
Product type Paperback
Published in Mar 2016
Publisher
ISBN-13 9781784397357
Length 264 pages
Edition 1st Edition
Tools
Arrow right icon
Toc

Table of Contents (8) Chapters Close

Preface 1. Introduction to Mapbox FREE CHAPTER 2. Mapbox Services 3. TileMill and Mapbox Studio 4. Mapbox.js 5. Mapbox.js Advanced 6. Mapbox GL Index

Publishing your base map on your server with PHP

So far, we have successfully used the tools provided by Mapbox to style our maps. We have also seen how easy it is to publish a map to the Mapbox platform, especially if we use Mapbox Studio.

There are cases where we may need to host a map on our own server, and we will explore two different ways of doing this.

In the first case, we will use PHP. While this is not the best option for this task, PHP can be found installed on every server, and projects using PHP are easy to deploy.

How it works…

First of all, we will export our maps from TileMill. The format that we will export in will be .mbtiles, which is actually a SQLite file containing the data and the tiles.

Note

MBTiles is just a SQLite database that contains metadata information along with PNG images. Its purpose is to have a single file that contains everything needed to serve a map. In cases such as mobile applications, storing thousands of tiles and metadata information in the app...

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 $19.99/month. Cancel anytime
Banner background image