PHPackages                             runalyze/static-maps - 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. [Image &amp; Media](/categories/media)
4. /
5. runalyze/static-maps

ActiveLibrary[Image &amp; Media](/categories/media)

runalyze/static-maps
====================

Library to create static images from various map tile providers.

1.0.0(1y ago)7864↑50%3[2 PRs](https://github.com/Runalyze/static-maps/pulls)MITPHPPHP &gt;=8.2

Since Oct 4Pushed 1y ago4 watchersCompare

[ Source](https://github.com/Runalyze/static-maps)[ Packagist](https://packagist.org/packages/runalyze/static-maps)[ RSS](/packages/runalyze-static-maps/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (7)Versions (11)Used By (0)

StaticMaps
==========

[](#staticmaps)

[![Latest Version on Packagist](https://camo.githubusercontent.com/839dc3a40d90bf360eb01c2d143dc0191a053ccbbd6d1cab222cf6b4a77bfab0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f72756e616c797a652f7374617469632d6d6170732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/runalyze/static-maps)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE)[![Total Downloads](https://camo.githubusercontent.com/fd1cb9002e2a134fed5db6f791717e1673723488fe9ca8ed728a12ec4c2d0f9f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f72756e616c797a652f7374617469632d6d6170732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/runalyze/static-maps)

Library to create static images from various map tile providers. StaticMaps will fetch map tiles from a specified tile provider and combine them to a static image of specified size for any bounding box.

StaticMaps requires [Intervention Image](https://github.com/Intervention/image) for drawing and [League\\Flysystem](https://github.com/thephpleague/flysystem) for tile caching.

Install
-------

[](#install)

Via Composer

```
$ composer require runalyze/static-maps
```

Usage
-----

[](#usage)

For a full list of required use statements, see [example-1.php](docs/examples/example-1.php):

```
$imageManager = ImageManager::gd();
$tileService = new OpenStreetMapDe();
$tileCache = new FilesystemCache(new Filesystem(new LocalFilesystemAdapter(__DIR__.'/cache/tiles')), $imageManager);
$tileProvider = new TileProvider($tileService, $imageManager, new \GuzzleHttp\Client(), $tileCache);

$map = new Map(new Viewport(500, 350, new BoundingBox(53.40, 53.75, 9.90, 10.10), $tileService));
$map->addFeature(new TileMap($tileProvider));
$map->addFeature(new CopyrightNotice($tileService->getAttributionText(), function (\Intervention\Image\Typography\FontFactory $font) {
    $font->file('./resources/font/Roboto-Regular.ttf');
}));

$provider = new Renderer($imageManager);
$image = $provider->renderMap($map);

file_put_contents('example-1.png', $image->toPng());
```

[![Example for static map](docs/examples/example-1.png)](docs/examples/example-1.png)

It's also possible to use a complete route as base for the image, see [example-2.php](docs/examples/example-2.php):

```
$route = new Route([[53.57532, 10.01534], [52.520008, 13.404954], [48.13743, 11.57549]], '#ff5500', 5);

$map = new Map(new Viewport(300, 200, $route->getBoundingBox(), $tileService));
$map->addFeature(new TileMap($tileProvider);
$map->addFeature($route);

// ...
```

[![Example for static map with route](docs/examples/example-2.png)](docs/examples/example-2.png)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE) for more information.

###  Health Score

43

—

FairBetter than 91% of packages

Maintenance38

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity80

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 85.7% 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 ~319 days

Recently: every ~533 days

Total

8

Last Release

549d ago

Major Versions

0.4.2 → 1.0.02024-11-16

PHP version history (3 changes)0.1.0PHP &gt;=7.0

0.4.0PHP &gt;=8.0

1.0.0PHP &gt;=8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/50d6353d737e2c48fd129760b241891b35565b6e608878a12b5413896ccf929c?d=identicon)[mipapo](/maintainers/mipapo)

![](https://www.gravatar.com/avatar/5c5df8039a12382d81c2d47ce24846dc6d8a8dcdb37876763d8d2ad99e010b8e?d=identicon)[laufhannes](/maintainers/laufhannes)

---

Top Contributors

[![laufhannes](https://avatars.githubusercontent.com/u/8313118?v=4)](https://github.com/laufhannes "laufhannes (12 commits)")[![mipapo](https://avatars.githubusercontent.com/u/2135076?v=4)](https://github.com/mipapo "mipapo (2 commits)")

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/runalyze-static-maps/health.svg)

```
[![Health](https://phpackages.com/badges/runalyze-static-maps/health.svg)](https://phpackages.com/packages/runalyze-static-maps)
```

###  Alternatives

[laravel/framework

The Laravel Framework.

34.7k509.9M17.0k](/packages/laravel-framework)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[magento/community-edition

Magento 2 (Open Source)

12.1k52.1k10](/packages/magento-community-edition)[bkwld/croppa

Image thumbnail creation through specially formatted URLs for Laravel

510496.0k23](/packages/bkwld-croppa)[wheelpros/fitment-platform-api

Magento 2 (Open Source)

12.1k1.2k](/packages/wheelpros-fitment-platform-api)[laravel-zero/framework

The Laravel Zero Framework.

3371.4M369](/packages/laravel-zero-framework)

PHPackages © 2026

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