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

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

tidusvn05/google-static-map-generator
=====================================

PHP Wrapper Lib to use google static map generate image file or url

1.4(8y ago)410.9k↓50%2[2 PRs](https://github.com/tidusvn05/google-static-map-generator/pulls)GNUPHPPHP &gt;=5.4

Since Jun 22Pushed 6y ago1 watchersCompare

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

READMEChangelogDependencies (3)Versions (6)Used By (0)

google-static-map-generator
===========================

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

A tool to generate google static map image for Php, laravel.

- support multiple markers with multiple locaions on every maker.
- support polygon path to draw shape: circle, polygon.

Installation
============

[](#installation)

`composer require tidusvn05/google-static-map-generator`

Usage
=====

[](#usage)

##### 1. Simple

[](#1-simple)

```
require_once __DIR__ . '/../vendor/autoload.php';

 use Tidusvn05\StaticMap\StaticMap;

 $sm = new StaticMap();
 $sm->setKey('Your google map static api key')
 ->setZoom(10)
  ->setCenter([9.851040, 106.422389]);
 $sm->generateUrl();

```

=&gt; result is: `https://maps.googleapis.com/maps/api/staticmap?key=AIzaSyAxAoi14Kkehkv2vE2RVHitCTcPC3BarBw&center=9.85104%2C106.422389&size=400x400&language=en`

##### 2. With marker

[](#2-with-marker)

```
use Tidusvn05\StaticMap\StaticMap;
use Tidusvn05\StaticMap\Marker;

$sm = new StaticMap();
$url = $sm->setKey('AIzaSyCdSA4UthyZnc34U-D3qa99jDZmWncwnYo')
  ->setCenter([9.851040, 106.422389])
  ->setZoom(8);

$marker = new Marker();
$marker->addLocation([9.856045, 106.410052])
  ->addLocation([9.904829, 105.333493])
  ->setAnchor('center')
  ->setIcon("https://cdn0.iconfinder.com/data/icons/glyphpack/68/phone-64.png");

$sm->addMarker($marker);

$marker2 = new Marker();
$marker2->addLocation([10.359861, 106.065469])
  ->setAnchor('center')
  ->setIcon("https://cdn2.iconfinder.com/data/icons/city-basic-people/240/basicman03-64.png");

$sm->addMarker($marker2);

echo $sm->generateUrl();

```

#### 3. Polygon Shape

[](#3-polygon-shape)

```
$points = [
  [34.75966612466248, 134.2529296875],
  [32.491230287947594, 134.31884765625],
  [32.39851580247402, 138.36181640625],
  [35.083955579276434, 137.548828125],
  [35.3340712150252, 135.7339782068741],
  [34.75966612466248, 134.2529296875],
];
$path = new Path();
$path->setBorderColor("0xe8dd10")
	->setFillColor("0x1f0fd8")
	->setPath($points);

$sm->addPath($path);

//can add more path object.

// https://maps.googleapis.com/maps/api/staticmap?key=AIzaSyCdSA4UthyZnc34U-D3qa99jDZmWncwnYo&size=400x400&language=en&path=fillcolor:0x1f0fd8|color:0xe8dd10|enc:}~csEyglrXv`zL_{KlbQqstW_okOdx}Cezo@xmaJ~doBpg`H

```

#### 4. Generate Img

[](#4-generate-img)

```
$sm->generateImg("examples/sample.png");

```

#### 5. With Styled Map

[](#5-with-styled-map)

```
->AddStyledsfromJson("./examples/styledmap.json")

```

Author
======

[](#author)

Tidusvn05 ()

License
=======

[](#license)

GNU

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity28

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 54.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 ~1 days

Total

5

Last Release

3238d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/2610894?v=4)[Tidusvn05](/maintainers/tidusvn05)[@tidusvn05](https://github.com/tidusvn05)

---

Top Contributors

[![tandatit](https://avatars.githubusercontent.com/u/46947147?v=4)](https://github.com/tandatit "tandatit (6 commits)")[![tidusvn05](https://avatars.githubusercontent.com/u/2610894?v=4)](https://github.com/tidusvn05 "tidusvn05 (5 commits)")

---

Tags

mapsgoogle mapstatic map

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[milon/barcode

Barcode generator like Qr Code, PDF417, C39, C39+, C39E, C39E+, C93, S25, S25+, I25, I25+, C128, C128A, C128B, C128C, 2-Digits UPC-Based Extention, 5-Digits UPC-Based Extention, EAN 8, EAN 13, UPC-A, UPC-E, MSI (Variation of Plessey code)

1.5k13.3M39](/packages/milon-barcode)[bkwld/croppa

Image thumbnail creation through specially formatted URLs for Laravel

510496.0k22](/packages/bkwld-croppa)[goat1000/svggraph

Generates SVG graphs

132849.6k3](/packages/goat1000-svggraph)[cohensive/embed

Media Embed (for Laravel or as a standalone).

120370.4k](/packages/cohensive-embed)[netresearch/rte-ckeditor-image

Image support in CKEditor for the TYPO3 ecosystem - by Netresearch

63991.3k4](/packages/netresearch-rte-ckeditor-image)[humanmade/tachyon-plugin

Rewrites WordPress image URLs to use Tachyon

87338.5k2](/packages/humanmade-tachyon-plugin)

PHPackages © 2026

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