PHPackages                             mapsight/tile-proxy - 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. mapsight/tile-proxy

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

mapsight/tile-proxy
===================

Simple tile proxy

v1.0.2(2w ago)04proprietaryPHPPHP ^8.2.0CI passing

Since May 24Pushed 2w agoCompare

[ Source](https://github.com/open-mapsight/tile-proxy)[ Packagist](https://packagist.org/packages/mapsight/tile-proxy)[ Docs](https://github.com/open-mapsight/mapsight-tile-proxy)[ RSS](/packages/mapsight-tile-proxy/feed)WikiDiscussions main Synced 1w ago

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

Tile proxy
==========

[](#tile-proxy)

Tile proxy is a PHP-based server for processing and caching tiles.

Usage
-----

[](#usage)

You can initialize the proxy by providing a configuration array or by pointing to a JSONC (JSON with comments) configuration file.

### Initialization

[](#initialization)

#### Using JSONC Configuration

[](#using-jsonc-configuration)

```
use OpenMapsight\TileProxy\Base;

Base::runFromJsonConfigFile('/path/to/config.jsonc');
```

#### Using Array Configuration

[](#using-array-configuration)

```
use OpenMapsight\TileProxy\Base;

$config = [
    // ... configuration ...
];

Base::run($config);
```

Configuration
-------------

[](#configuration)

The configuration defines the behavior of the proxy.

- `cacheServerPath`: Base directory for caching tiles.
- `ops`: A list of operations to perform on the tiles.
- `debug`: (Optional) If set to `true`, outputs exceptions in the browser.
- `prefixArgName`: (Optional) Name of the GET parameter to use for prefixing (e.g., to support different map styles).
- `allowedPrefixes`: (Optional) List of allowed values for the prefix argument.

### Operation Pipeline (Chaining)

[](#operation-pipeline-chaining)

Operations are chained sequentially as defined in the `ops` array. The first operation must be the `src` operation, which defines the source URL(s).

```
"ops": [
    {
        "cacheServerName": "source-1",
        "urls": ["https://example.com/tiles/{z}/{x}/{y}.png"],
        "mimeType": "image/png",
        "cacheBrowserTtl": 3600,
        "cacheServerTtl": 86400
    },
    {
        "op": "colorFilter",
        "filter": "reducedSaturation",
        "cacheServerName": "filter-1"
    },
    {
        "op": "imgOpt",
        "cacheServerName": "opt-1"
    }
]
```

### Available Operations

[](#available-operations)

- `src`: Fetches the tile from the defined `urls`. Supports `{z}`, `{x}`, `{y}`, and `{prefix}` placeholders.
- `colorFilter`: Applies color filters. Supported filters: `reducedSaturation`, `muted`, `culture`.
- `imgOpt`: Optimizes the image using image optimizers.
- `merge`: Merges the current tile with another set of operations.

Examples
--------

[](#examples)

### Layering Tiles

[](#layering-tiles)

You can layer tiles by using the `merge` operation to overlay another tile set on top of the base map. If the overlay request fails (e.g., returns a 404), the merge operation is skipped and the base tile is returned.

```
"ops": [
    {
        "cacheServerName": "base-map",
        "urls": ["https://tile.openstreetmap.org/{z}/{x}/{y}.png"],
        "mimeType": "image/png",
        "cacheBrowserTtl": 3600,
        "cacheServerTtl": 86400
    },
    {
        "op": "merge",
        "ops": [
            {
                "cacheServerName": "overlay",
                "urls": ["https://overlay.example.com/{z}/{x}/{y}.png"],
                "mimeType": "image/png",
                "cacheBrowserTtl": 3600,
                "cacheServerTtl": 86400
            }
        ]
    }
]
```

Development
-----------

[](#development)

### Testing

[](#testing)

To run the tests, use:

```
composer test
```

Or run PHPUnit directly:

```
vendor/bin/phpunit
```

###  Health Score

41

—

FairBetter than 87% of packages

Maintenance97

Actively maintained with recent releases

Popularity5

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

3

Last Release

16d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/b54507be50681c228e32acb9e78150408621f768590e31dbaaf61417f6095111?d=identicon)[pjeweb](/maintainers/pjeweb)

---

Top Contributors

[![pjeweb](https://avatars.githubusercontent.com/u/684458?v=4)](https://github.com/pjeweb "pjeweb (9 commits)")

---

Tags

tilesosmmapsight

###  Code Quality

TestsPHPUnit

Static AnalysisRector

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/mapsight-tile-proxy/health.svg)

```
[![Health](https://phpackages.com/badges/mapsight-tile-proxy/health.svg)](https://phpackages.com/packages/mapsight-tile-proxy)
```

###  Alternatives

[laravel/framework

The Laravel Framework.

34.7k532.1M19.2k](/packages/laravel-framework)[illuminate/collections

The Illuminate Collections package.

27075.6M1.0k](/packages/illuminate-collections)[illuminate/container

The Illuminate Container package.

31080.7M2.3k](/packages/illuminate-container)[composer/composer

Composer helps you declare, manage and install dependencies of PHP projects. It ensures you have the right stack everywhere.

29.4k193.1M3.0k](/packages/composer-composer)[friendsofphp/php-cs-fixer

A tool to automatically fix PHP code style

13.5k245.4M23.7k](/packages/friendsofphp-php-cs-fixer)[shopware/platform

The Shopware e-commerce core

3.4k1.5M3](/packages/shopware-platform)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
