PHPackages                             ministryofweb/php-osm-tiles - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. ministryofweb/php-osm-tiles

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

ministryofweb/php-osm-tiles
===========================

A library to convert map tile numbers to coordinates and vice versa.

4.0.0(8mo ago)64.6k↑341.7%MITPHPPHP ^8.1CI failing

Since Jan 30Pushed 8mo ago3 watchersCompare

[ Source](https://github.com/ministryofweb/php-osm-tiles)[ Packagist](https://packagist.org/packages/ministryofweb/php-osm-tiles)[ RSS](/packages/ministryofweb-php-osm-tiles/feed)WikiDiscussions main Synced yesterday

READMEChangelogDependencies (7)Versions (8)Used By (0)

PHP OSM Tiles
=============

[](#php-osm-tiles)

This library helps to convert OpenStreetMap (OSM) map tile numbers to geographical coordinates and vice versa.

[![PHP OSM Tiles Tests](https://github.com/ministryofweb/php-osm-tiles/actions/workflows/php.yml/badge.svg)](https://github.com/ministryofweb/php-osm-tiles/actions/workflows/php.yml)

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

[](#installation)

Using Composer, add it to your `composer.json` by running:

```
composer require ministryofweb/php-osm-tiles
```

Compatibility
-------------

[](#compatibility)

The PHP OSM Tiles library requires PHP &gt;= 8.1.

If support for older PHP versions is needed, the PHP OSM Tiles library can be installed at version 2.0 (PHP 7.3, PHP 7.4 and PHP 8.0), 1.0 (PHP 7.1 and PHP 7.2) or version 0.1.0 (PHP 7.0).

Usage/Examples
--------------

[](#usageexamples)

Convert from geographical coordinates to map tile numbers
---------------------------------------------------------

[](#convert-from-geographical-coordinates-to-map-tile-numbers)

```
