PHPackages                             html24/mbtiles-generator - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [File &amp; Storage](/categories/file-storage)
4. /
5. html24/mbtiles-generator

ActiveLibrary[File &amp; Storage](/categories/file-storage)

html24/mbtiles-generator
========================

Library for generating MBTiles files from different sources.

1.0.0(12y ago)213195[1 issues](https://github.com/HTML24/mbtiles-generator/issues)BSD-3-ClausePHPPHP &gt;=5.3.10

Since Feb 15Pushed 12y ago7 watchersCompare

[ Source](https://github.com/HTML24/mbtiles-generator)[ Packagist](https://packagist.org/packages/html24/mbtiles-generator)[ RSS](/packages/html24-mbtiles-generator/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependenciesVersions (2)Used By (0)

MBTilesGenerator
================

[](#mbtilesgenerator)

A PHP library for generating MBTiles files.

Supports fetching tiles from a web resource, implementing the [Slippy map tilenames specification](http://wiki.openstreetmap.org/wiki/Slippy_map_tilenames).

Also supports fetching tiles from another MBTiles file, for doing a subset of tiles.

Using a custom source, is as easy as implementing the `TileSourceInterface`.

What is a MBTiles file ?
------------------------

[](#what-is-a-mbtiles-file-)

An MBTiles file is a file format for storing map tiles, for easy transfer and storing. It is optimal for doing offline maps in mobile apps.

This library's output has been tested for usage with [Nutiteq 3D Android mapping SDK](https://github.com/nutiteq/hellomap3d) and [Mapbox iOS SDK](https://github.com/mapbox/mapbox-ios-sdk).

[MBTiles specification](https://github.com/mapbox/mbtiles-spec)

Installation
------------

[](#installation)

```
composer require html24/mbtiles-generator dev-master

```

Usage
-----

[](#usage)

This example code will download the tiles necessary for a small area in Copenhagen, Denmark and output a mbtiles file as output.mbtiles.

```
