PHPackages                             mastani/laravel-google-static-map - 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. mastani/laravel-google-static-map

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

mastani/laravel-google-static-map
=================================

Laravel Google Static Map Generator

2.5(1y ago)471.5M—4.5%16[1 issues](https://github.com/mastani/laravel-google-static-map/issues)[2 PRs](https://github.com/mastani/laravel-google-static-map/pulls)8MITPHP

Since Jul 12Pushed 1y ago2 watchersCompare

[ Source](https://github.com/mastani/laravel-google-static-map)[ Packagist](https://packagist.org/packages/mastani/laravel-google-static-map)[ Docs](https://github.com/mastani/laravel-google-static-map)[ RSS](/packages/mastani-laravel-google-static-map/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (2)Versions (14)Used By (8)

Google Static Map Generator
===========================

[](#google-static-map-generator)

Generate static map using Google Map API in Laravel.

[![Total Downloads](https://camo.githubusercontent.com/0c8381830cc9a6e53f3312ac57173a050a77a134fae1e36fadd57085a015f02a/68747470733a2f2f706f7365722e707567782e6f72672f6d617374616e692f6c61726176656c2d676f6f676c652d7374617469632d6d61702f646f776e6c6f616473)](https://packagist.org/packages/mastani/laravel-google-static-map)[![Latest Stable Version](https://camo.githubusercontent.com/86728c310dc59d26786c0369866fe60c82adf103c8b1913b3fc7ef44c027e137/68747470733a2f2f706f7365722e707567782e6f72672f6d617374616e692f6c61726176656c2d676f6f676c652d7374617469632d6d61702f762f737461626c65)](https://packagist.org/packages/mastani/laravel-google-static-map)[![Latest Unstable Version](https://camo.githubusercontent.com/e6fee9986df043e5f1c295232ad6e0e019f625c1f9ea50527b2cd6d74d99c001/68747470733a2f2f706f7365722e707567782e6f72672f6d617374616e692f6c61726176656c2d676f6f676c652d7374617469632d6d61702f762f756e737461626c65)](https://packagist.org/packages/mastani/laravel-google-static-map)[![License](https://camo.githubusercontent.com/1ef47409c63729d5979a9f85f30d4051ea1dcaff850bf894ce5d57b40effb63e/68747470733a2f2f706f7365722e707567782e6f72672f6d617374616e692f6c61726176656c2d676f6f676c652d7374617469632d6d61702f6c6963656e7365)](https://packagist.org/packages/mastani/laravel-google-static-map)

### Installation in Laravel 5.5 and up

[](#installation-in-laravel-55-and-up)

```
$ composer require mastani/laravel-google-static-map
```

The package will automatically register itself.

### Installation in Laravel 5.4

[](#installation-in-laravel-54)

```
$ composer require mastani/laravel-google-static-map
```

Next up, the service provider must be registered:

```
// config/app.php

'providers' => [
    ...
    Mastani\GoogleStaticMap\GoogleStaticMapServiceProvider::class,
];
```

### Installation without Laravel

[](#installation-without-laravel)

Another way is install the component through [composer](https://getcomposer.org/download/).

Either run

```
$ composer require mastani/laravel-google-static-map
```

or add

```
"mastani/laravel-google-static-map": "dev-master"
```

to the require section of your composer.json.

Usage
-----

[](#usage)

```
$map = new \Mastani\GoogleStaticMap\GoogleStaticMap('Place google map API key or leave it empty');
$url = $map->setCenter('Tehran')
           ->setMapType(\Mastani\GoogleStaticMap\MapType::RoadMap)
           ->setZoom(14)
           ->setSize(600, 600)
           ->setFormat(\Mastani\GoogleStaticMap\Format::JPG)
           ->addMarker('Tehran', '1', 'red', \Mastani\GoogleStaticMap\Size::Small)
           ->addMarkerLatLng(35.6907488, 51.3919293, '1', 'red', \Mastani\GoogleStaticMap\Size::Small)
           ->make(); // Return url contain map address.
           // or
           ->download($path); // Download map image
```

Function
--------

[](#function)

FunctionDescriptionsetSecret(secret)Set signing secret key.setCenter(location)Set map center with address.setCenterLatLng(latitude, longitude)Set map center with latitude and longitude.setZoom(zoom)Set map zoom.setScale(scale)Set map scale.setSize(width, height)Set map size.setMapType(type as MapType)Set map type.setMapId(id)Set a map ID previously created in Cloud Console.setFormat(format as Format)Set map format.addMarker(center, label, color, size)Add marker to map.addMarkerLatLng(latitude, longitude, label, color, size)Add marker to map with latitude and longitude.addMarkerWithIcon(center, icon, shadow)Add custom marker to map.addMarkerLatLngWithIcon(latitude, longitude, icon, shadow)Add marker to map with latitude and longitude.make()Make url string.download($path = 'current path', $name\_length = 10)Download map image in provided path.License
-------

[](#license)

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

###  Health Score

52

—

FairBetter than 96% of packages

Maintenance44

Moderate activity, may be stable

Popularity54

Moderate usage in the ecosystem

Community27

Small or concentrated contributor base

Maturity70

Established project with proven stability

 Bus Factor1

Top contributor holds 59.5% 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 ~202 days

Recently: every ~280 days

Total

13

Last Release

438d ago

Major Versions

v1.5 → 2.02020-11-04

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/7414851?v=4)[Amin Mastani](/maintainers/mastani)[@mastani](https://github.com/mastani)

---

Top Contributors

[![mastani](https://avatars.githubusercontent.com/u/7414851?v=4)](https://github.com/mastani "mastani (22 commits)")[![cyrillkalita](https://avatars.githubusercontent.com/u/2401848?v=4)](https://github.com/cyrillkalita "cyrillkalita (6 commits)")[![laravel-shift](https://avatars.githubusercontent.com/u/15991828?v=4)](https://github.com/laravel-shift "laravel-shift (3 commits)")[![xewl](https://avatars.githubusercontent.com/u/245041?v=4)](https://github.com/xewl "xewl (2 commits)")[![madbob](https://avatars.githubusercontent.com/u/166089?v=4)](https://github.com/madbob "madbob (1 commits)")[![josefbehr](https://avatars.githubusercontent.com/u/4368880?v=4)](https://github.com/josefbehr "josefbehr (1 commits)")[![michaeldyrynda](https://avatars.githubusercontent.com/u/558441?v=4)](https://github.com/michaeldyrynda "michaeldyrynda (1 commits)")[![mwasper](https://avatars.githubusercontent.com/u/44566296?v=4)](https://github.com/mwasper "mwasper (1 commits)")

---

Tags

google-maplaravellaravelgooglegeneratorstatic maps

### Embed Badge

![Health badge](/badges/mastani-laravel-google-static-map/health.svg)

```
[![Health](https://phpackages.com/badges/mastani-laravel-google-static-map/health.svg)](https://phpackages.com/packages/mastani-laravel-google-static-map)
```

###  Alternatives

[spatie/laravel-livewire-wizard

Build wizards using Livewire

4061.0M4](/packages/spatie-laravel-livewire-wizard)[tonysm/importmap-laravel

Use ESM with importmap to manage modern JavaScript in Laravel without transpiling or bundling.

148399.8k1](/packages/tonysm-importmap-laravel)[bensampo/laravel-embed

Painless responsive embeds for videos, slideshows and more.

142146.8k](/packages/bensampo-laravel-embed)[dragon-code/pretty-routes

Pretty Routes for Laravel

10058.7k4](/packages/dragon-code-pretty-routes)[laracraft-tech/laravel-useful-additions

A collection of useful Laravel additions!

58109.4k](/packages/laracraft-tech-laravel-useful-additions)[linkxtr/laravel-qrcode

A clean, modern, and easy-to-use QR code generator for Laravel

295.1k](/packages/linkxtr-laravel-qrcode)

PHPackages © 2026

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