PHPackages                             exor/phpgmaps - 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. exor/phpgmaps

ActiveLibrary

exor/phpgmaps
=============

1.0(10y ago)018PHPPHP &gt;=5.4.0

Since Mar 18Pushed 10y ago1 watchersCompare

[ Source](https://github.com/Exor/phpgmaps)[ Packagist](https://packagist.org/packages/exor/phpgmaps)[ RSS](/packages/exor-phpgmaps/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (1)Versions (2)Used By (0)

Phpgmaps
--------

[](#phpgmaps)

A none CI implementation of BIOINSTALL's [CodeIgniter library](http://github.com/BIOSTALL/CodeIgniter-Google-Maps-V3-API-Library).

---

I found this library to be incredibly useful when I was working in CodeIgniter. However a little bit of work needed to be done to use it in a Laravel project. I can't take any of the credit for the actual "heavy lifting" going on in the class.

---

[![Latest Stable Version](https://camo.githubusercontent.com/8b6c33fa4b42670bad2ea3f07480e12b50756695ae4c727755c9bddf8f510a06/68747470733a2f2f706f7365722e707567782e6f72672f617070697476656e74757265732f706870676d6170732f762f737461626c652e737667)](https://packagist.org/packages/appitventures/phpgmaps)[![Total Downloads](https://camo.githubusercontent.com/4ce1bd598ae09c32175812712d6c41cf8abfef083939e1644a371e2b542975bb/68747470733a2f2f706f7365722e707567782e6f72672f617070697476656e74757265732f706870676d6170732f646f776e6c6f6164732e737667)](https://packagist.org/packages/appitventures/phpgmaps)[![Monthly Downloads](https://camo.githubusercontent.com/6a56b1e495f59fdb08dad857b00220a8badd7ca705474a84cfe52b9cbd35c341/68747470733a2f2f706f7365722e707567782e6f72672f617070697476656e74757265732f706870676d6170732f642f6d6f6e74686c792e706e67)](https://packagist.org/packages/appitventures/phpgmaps)[![License](https://camo.githubusercontent.com/45761307445bed20bee9df104f3cc5814f39307b4065609802b989404e5482c9/68747470733a2f2f706f7365722e707567782e6f72672f617070697476656e74757265732f706870676d6170732f6c6963656e73652e737667)](https://packagist.org/packages/appitventures/phpgmaps)

\#Installation

Add this package in your `composer.json` and update composer.

For Laravel 4.\* use the below line. Please be aware that I only have the time to support the latest stable release of Laravel. So any future updates (features, security, or otherwise) will not be applied to the branch for laravel4 compatibility

```
"appitventures/phpgmaps": "1.0.*@dev"
```

For Laravel 5.\* use the below line

```
"appitventures/phpgmaps": "2.0.*@dev"
```

After updating composer, add the ServiceProvider to the providers array in `app/config/app.php`

```
'Appitventures\Phpgmaps\PhpgmapsServiceProvider',
```

And the Facade

```
'Gmaps' => 'Appitventures\Phpgmaps\Facades\Phpgmaps',
```

### Example

[](#example)

The following code will prompt the user for access to their geolocation and then creates a map centered on their lat/lng

```
Route::get('/', function(){
    $config = array();
    $config['center'] = 'auto';
    $config['onboundschanged'] = 'if (!centreGot) {
            var mapCentre = map.getCenter();
            marker_0.setOptions({
                position: new google.maps.LatLng(mapCentre.lat(), mapCentre.lng())
            });
        }
        centreGot = true;';

    Gmaps::initialize($config);

    // set up the marker ready for positioning
    // once we know the users location
    $marker = array();
    Gmaps::add_marker($marker);

    $map = Gmaps::create_map();
    echo "var centreGot = false;".$map['js']."".$map['html']."";
});

```

### More Examples

[](#more-examples)

BIOINSTALL has a great website showing how to do all the things with the class. No reason to reinvent the wheel, so [here](http://biostall.com/demos/google-maps-v3-api-codeigniter-library/) it is. The only thing to note is that `$this->googlemaps` is now `Gmaps::`.

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

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

Unknown

Total

1

Last Release

3711d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/87ce1a0880342d100808ba44636383c366637db9390c55e42183465646ad385a?d=identicon)[Exor](/maintainers/Exor)

### Embed Badge

![Health badge](/badges/exor-phpgmaps/health.svg)

```
[![Health](https://phpackages.com/badges/exor-phpgmaps/health.svg)](https://phpackages.com/packages/exor-phpgmaps)
```

###  Alternatives

[fumeapp/modeltyper

Generate TypeScript interfaces from Laravel Models

196277.9k](/packages/fumeapp-modeltyper)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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